Make sure all relevant packages have been installed. These include:
tidyverse
tidyr
dplyr
psych
MASS
htmlwidgets
plotly
ggsci
ggpubr
ggpattern
jtools
moments
car
First of all, make sure your working directory is set up so that the csv files you need can be read by R.
We can now proceed to import the datafile “Wave 1A”. The first four
rows of the file are not necessary for our analyses as they contain two
pilot data from the researchers and empty cells.
library(psych)
library(MASS)
library(tidyr)
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.0 ✔ purrr 1.0.1
## ✔ forcats 1.0.0 ✔ readr 2.1.4
## ✔ ggplot2 3.4.1 ✔ stringr 1.5.0
## ✔ lubridate 1.9.2 ✔ tibble 3.1.8
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ ggplot2::%+%() masks psych::%+%()
## ✖ ggplot2::alpha() masks psych::alpha()
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## ✖ dplyr::select() masks MASS::select()
## ℹ Use the ]8;;http://conflicted.r-lib.org/conflicted package]8;; to force all conflicts to become errors
library(dplyr)
library(htmlwidgets)
library(plotly)
##
## Attaching package: 'plotly'
##
## The following object is masked from 'package:ggplot2':
##
## last_plot
##
## The following object is masked from 'package:MASS':
##
## select
##
## The following object is masked from 'package:stats':
##
## filter
##
## The following object is masked from 'package:graphics':
##
## layout
library(ggsci)
library(ggpubr)
library(ggpattern)
library(jtools)
library(moments)
wave1a <- read.csv("wave1A.csv", comment.char="#", stringsAsFactors=FALSE, na.strings=c("","NA"))
#get dimensions and name of the variables
dim(wave1a)
## [1] 448 271
#[1] 448 271
colnames(wave1a)
## [1] "StartDate" "EndDate" "Status"
## [4] "IPAddress" "Progress" "Duration..in.seconds."
## [7] "Finished" "RecordedDate" "ResponseId"
## [10] "RecipientLastName" "RecipientFirstName" "RecipientEmail"
## [13] "ExternalReference" "LocationLatitude" "LocationLongitude"
## [16] "DistributionChannel" "UserLanguage" "Q1"
## [19] "Q2" "Q3" "Q4"
## [22] "Q5" "Q8" "Q9"
## [25] "Q11" "Q12" "Q13"
## [28] "Q14" "Q15" "Q16"
## [31] "Q16_4_TEXT" "Q17" "Q18"
## [34] "Q18_4_TEXT" "Q19" "Q19_5_TEXT"
## [37] "Q20" "Q21" "Q22"
## [40] "Q23" "Q23_5_TEXT" "Q24"
## [43] "Q25" "Q26" "Q27"
## [46] "Q28" "Q29" "Q30"
## [49] "Q31" "Q32" "Q33"
## [52] "Q34" "Q35" "Q36"
## [55] "Q37" "Q38" "Q39"
## [58] "Q40" "Q41" "Q42"
## [61] "Q43" "Q44" "Q45"
## [64] "Q46" "Q47" "Q48"
## [67] "Q49_1" "Q49_2" "Q50"
## [70] "Q51" "Q53" "Q54_1"
## [73] "Q54_2" "Q55" "Q55_0_TEXT"
## [76] "Q56_1" "Q56_2" "Q57"
## [79] "Q58_1" "Q58_2" "Q59_1"
## [82] "Q59_2" "Q60" "Q61"
## [85] "Q62" "Q217" "Q63"
## [88] "Q64" "Q65" "Q66"
## [91] "Q67" "Q68" "Q69"
## [94] "Q70" "Q71" "Q72"
## [97] "Q73" "Q74" "Q75_1"
## [100] "Q75_2" "Q75_3" "Q75_4"
## [103] "Q75_5" "Q75_6" "Q75_7"
## [106] "Q75_8" "Q76" "Q77"
## [109] "Q78" "Q79" "Q80"
## [112] "Q81" "Q218" "Q82"
## [115] "Q83" "Q84" "Q85"
## [118] "Q86" "Q87" "Q88"
## [121] "Q89" "Q90" "Q91"
## [124] "Q92" "Q93" "Q94"
## [127] "Q95" "Q96" "Q97"
## [130] "Q98" "Q99" "Q100"
## [133] "Q101" "Q102" "Q103"
## [136] "Q104" "Q105" "Q106"
## [139] "Q107" "Q108" "Q109"
## [142] "Q110" "Q111" "Q112"
## [145] "Q113" "Q114" "Q115"
## [148] "Q116" "Q117" "Q118"
## [151] "Q119" "Q120" "Q121"
## [154] "Q122" "Q123" "Q124"
## [157] "Q125" "Q126" "Q127"
## [160] "Q128" "Q129" "Q130"
## [163] "Q131" "Q131_4_TEXT" "Q132_1"
## [166] "Q132_2" "Q132_3" "Q132_4"
## [169] "Q132_5" "Q132_6" "Q132_7"
## [172] "Q133_1" "Q133_2" "Q133_3"
## [175] "Q133_4" "Q133_5" "Q133_6"
## [178] "Q133_7" "Q133_8" "Q133_9"
## [181] "Q136" "Q137" "Q138"
## [184] "Q140_1" "Q140_2" "Q140_3"
## [187] "Q140_4" "Q140_5" "Q140_6"
## [190] "Q140_7" "Q140_8" "Q140_9"
## [193] "Q140_10" "Q140_11" "Q140_12"
## [196] "Q140_13" "Q140_14" "Q141"
## [199] "Q142" "Q143" "Q144"
## [202] "Q220" "Q145" "Q146"
## [205] "Q148" "Q149" "Q150"
## [208] "Q151" "Q152" "Q153"
## [211] "Q154" "Q155" "Q156"
## [214] "Q157_1" "Q157_2" "Q157_3"
## [217] "Q157_4" "Q157_5" "Q157_6"
## [220] "Q157_7" "Q159" "Q160"
## [223] "Q161" "Q162" "Q163"
## [226] "Q164" "Q165" "Q166"
## [229] "Q167" "Q168" "Q169"
## [232] "Q221" "Q170" "Q171"
## [235] "Q172" "Q173" "Q174"
## [238] "Q175" "Q176" "Q178"
## [241] "Q179" "Q180" "Q181"
## [244] "Q182" "Q183" "Q184"
## [247] "Q185" "Q186" "Q187"
## [250] "Q188" "Q189" "Q190"
## [253] "Q191" "Q192" "Q193"
## [256] "Q194" "Q195" "Q196"
## [259] "Q197" "Q198" "Q199"
## [262] "Q200" "Q201" "Q202"
## [265] "Q203" "Q204" "Q207"
## [268] "Q209" "Q212" "Q214"
## [271] "Q216"
#[1] "StartDate" "EndDate" "Status"
# [4] "IPAddress" "Progress" #"Duration..in.seconds."
# [7] "Finished" "RecordedDate" #"ResponseId"
# [10] "RecipientLastName" "RecipientFirstName" #"RecipientEmail"
#[13] "ExternalReference" "LocationLatitude" #"LocationLongitude"
#[16] "DistributionChannel" "UserLanguage" "Q1"
#[19] "Q2" "Q3" "Q4"
#[22] "Q5" "Q8" "Q9"
#[25] "Q11" "Q12" "Q13"
#[28] "Q14" "Q15" "Q16"
#[31] "Q16_4_TEXT" "Q17" "Q18"
#[34] "Q18_4_TEXT" "Q19" "Q19_5_TEXT"
#[37] "Q20" "Q21" "Q22"
#[40] "Q23" "Q23_5_TEXT" "Q24"
#[43] "Q25" "Q26" "Q27"
#[46] "Q28" "Q29" "Q30"
#[49] "Q31" "Q32" "Q33"
#[52] "Q34" "Q35" "Q36"
#[55] "Q37" "Q38" "Q39"
#[58] "Q40" "Q41" "Q42"
#[61] "Q43" "Q44" "Q45"
#[64] "Q46" "Q47" "Q48"
#[67] "Q49_1" "Q49_2" "Q50"
#[70] "Q51" "Q53" "Q54_1"
#[73] "Q54_2" "Q55" "Q55_0_TEXT"
#[76] "Q56_1" "Q56_2" "Q57"
#[79] "Q58_1" "Q58_2" "Q59_1"
#[82] "Q59_2" "Q60" "Q61"
#[85] "Q62" "Q217" "Q63"
#[88] "Q64" "Q65" "Q66"
#[91] "Q67" "Q68" "Q69"
#[94] "Q70" "Q71" "Q72"
#[97] "Q73" "Q74" "Q75_1"
#[100] "Q75_2" "Q75_3" "Q75_4"
#[103] "Q75_5" "Q75_6" "Q75_7"
#[106] "Q75_8" "Q76" "Q77"
#[109] "Q78" "Q79" "Q80"
#[112] "Q81" "Q218" "Q82"
#[115] "Q83" "Q84" "Q85"
#[118] "Q86" "Q87" "Q88"
#[121] "Q89" "Q90" "Q91"
#[124] "Q92" "Q93" "Q94"
#[127] "Q95" "Q96" "Q97"
#[130] "Q98" "Q99" "Q100"
#[133] "Q101" "Q102" "Q103"
#[136] "Q104" "Q105" "Q106"
#139] "Q107" "Q108" "Q109"
#142] "Q110" "Q111" "Q112"
#145] "Q113" "Q114" "Q115"
#148] "Q116" "Q117" "Q118"
#151] "Q119" "Q120" "Q121"
#154] "Q122" "Q123" "Q124"
#157] "Q125" "Q126" "Q127"
#160] "Q128" "Q129" "Q130"
#163] "Q131" "Q131_4_TEXT" "Q132_1"
#166] "Q132_2" "Q132_3" "Q132_4"
#169] "Q132_5" "Q132_6" "Q132_7"
#172] "Q133_1" "Q133_2" "Q133_3"
#175] "Q133_4" "Q133_5" "Q133_6"
#178] "Q133_7" "Q133_8" "Q133_9"
#181] "Q136" "Q137" "Q138"
#184] "Q140_1" "Q140_2" "Q140_3"
#187] "Q140_4" "Q140_5" "Q140_6"
#190] "Q140_7" "Q140_8" "Q140_9"
#193] "Q140_10" "Q140_11" "Q140_12"
#196] "Q140_13" "Q140_14" "Q141"
#199] "Q142" "Q143" "Q144"
#202] "Q220" "Q145" "Q146"
#205] "Q148" "Q149" "Q150"
#208] "Q151" "Q152" "Q153"
#211] "Q154" "Q155" "Q156"
#214] "Q157_1" "Q157_2" "Q157_3"
#217] "Q157_4" "Q157_5" "Q157_6"
#220] "Q157_7" "Q159" "Q160"
#223] "Q161" "Q162" "Q163"
#226] "Q164" "Q165" "Q166"
#229] "Q167" "Q168" "Q169"
#232] "Q221" "Q170" "Q171"
#235] "Q172" "Q173" "Q174"
#238] "Q175" "Q176" "Q178"
#241] "Q179" "Q180" "Q181"
#244] "Q182" "Q183" "Q184"
#247] "Q185" "Q186" "Q187"
#250] "Q188" "Q189" "Q190"
#253] "Q191" "Q192" "Q193"
#256 "Q194" "Q195" "Q196"
#259] "Q197" "Q198" "Q199"
#262] "Q200" "Q201" "Q202"
#265] "Q203" "Q204" "Q207"
#268] "Q209" "Q212" "Q214"
#271] "Q216"
#remove the first four rows(string + two pilot participants)
wave1 <- wave1a[-c(1,2,3,4),]
#check for head and dimensions of the datafile
head(wave1)
wc <- data.frame(colnames(wave1a))
knitr::kable(wc)
| colnames.wave1a. |
|---|
| StartDate |
| EndDate |
| Status |
| IPAddress |
| Progress |
| Duration..in.seconds. |
| Finished |
| RecordedDate |
| ResponseId |
| RecipientLastName |
| RecipientFirstName |
| RecipientEmail |
| ExternalReference |
| LocationLatitude |
| LocationLongitude |
| DistributionChannel |
| UserLanguage |
| Q1 |
| Q2 |
| Q3 |
| Q4 |
| Q5 |
| Q8 |
| Q9 |
| Q11 |
| Q12 |
| Q13 |
| Q14 |
| Q15 |
| Q16 |
| Q16_4_TEXT |
| Q17 |
| Q18 |
| Q18_4_TEXT |
| Q19 |
| Q19_5_TEXT |
| Q20 |
| Q21 |
| Q22 |
| Q23 |
| Q23_5_TEXT |
| Q24 |
| Q25 |
| Q26 |
| Q27 |
| Q28 |
| Q29 |
| Q30 |
| Q31 |
| Q32 |
| Q33 |
| Q34 |
| Q35 |
| Q36 |
| Q37 |
| Q38 |
| Q39 |
| Q40 |
| Q41 |
| Q42 |
| Q43 |
| Q44 |
| Q45 |
| Q46 |
| Q47 |
| Q48 |
| Q49_1 |
| Q49_2 |
| Q50 |
| Q51 |
| Q53 |
| Q54_1 |
| Q54_2 |
| Q55 |
| Q55_0_TEXT |
| Q56_1 |
| Q56_2 |
| Q57 |
| Q58_1 |
| Q58_2 |
| Q59_1 |
| Q59_2 |
| Q60 |
| Q61 |
| Q62 |
| Q217 |
| Q63 |
| Q64 |
| Q65 |
| Q66 |
| Q67 |
| Q68 |
| Q69 |
| Q70 |
| Q71 |
| Q72 |
| Q73 |
| Q74 |
| Q75_1 |
| Q75_2 |
| Q75_3 |
| Q75_4 |
| Q75_5 |
| Q75_6 |
| Q75_7 |
| Q75_8 |
| Q76 |
| Q77 |
| Q78 |
| Q79 |
| Q80 |
| Q81 |
| Q218 |
| Q82 |
| Q83 |
| Q84 |
| Q85 |
| Q86 |
| Q87 |
| Q88 |
| Q89 |
| Q90 |
| Q91 |
| Q92 |
| Q93 |
| Q94 |
| Q95 |
| Q96 |
| Q97 |
| Q98 |
| Q99 |
| Q100 |
| Q101 |
| Q102 |
| Q103 |
| Q104 |
| Q105 |
| Q106 |
| Q107 |
| Q108 |
| Q109 |
| Q110 |
| Q111 |
| Q112 |
| Q113 |
| Q114 |
| Q115 |
| Q116 |
| Q117 |
| Q118 |
| Q119 |
| Q120 |
| Q121 |
| Q122 |
| Q123 |
| Q124 |
| Q125 |
| Q126 |
| Q127 |
| Q128 |
| Q129 |
| Q130 |
| Q131 |
| Q131_4_TEXT |
| Q132_1 |
| Q132_2 |
| Q132_3 |
| Q132_4 |
| Q132_5 |
| Q132_6 |
| Q132_7 |
| Q133_1 |
| Q133_2 |
| Q133_3 |
| Q133_4 |
| Q133_5 |
| Q133_6 |
| Q133_7 |
| Q133_8 |
| Q133_9 |
| Q136 |
| Q137 |
| Q138 |
| Q140_1 |
| Q140_2 |
| Q140_3 |
| Q140_4 |
| Q140_5 |
| Q140_6 |
| Q140_7 |
| Q140_8 |
| Q140_9 |
| Q140_10 |
| Q140_11 |
| Q140_12 |
| Q140_13 |
| Q140_14 |
| Q141 |
| Q142 |
| Q143 |
| Q144 |
| Q220 |
| Q145 |
| Q146 |
| Q148 |
| Q149 |
| Q150 |
| Q151 |
| Q152 |
| Q153 |
| Q154 |
| Q155 |
| Q156 |
| Q157_1 |
| Q157_2 |
| Q157_3 |
| Q157_4 |
| Q157_5 |
| Q157_6 |
| Q157_7 |
| Q159 |
| Q160 |
| Q161 |
| Q162 |
| Q163 |
| Q164 |
| Q165 |
| Q166 |
| Q167 |
| Q168 |
| Q169 |
| Q221 |
| Q170 |
| Q171 |
| Q172 |
| Q173 |
| Q174 |
| Q175 |
| Q176 |
| Q178 |
| Q179 |
| Q180 |
| Q181 |
| Q182 |
| Q183 |
| Q184 |
| Q185 |
| Q186 |
| Q187 |
| Q188 |
| Q189 |
| Q190 |
| Q191 |
| Q192 |
| Q193 |
| Q194 |
| Q195 |
| Q196 |
| Q197 |
| Q198 |
| Q199 |
| Q200 |
| Q201 |
| Q202 |
| Q203 |
| Q204 |
| Q207 |
| Q209 |
| Q212 |
| Q214 |
| Q216 |
print(dim(wave1))
## [1] 444 271
Secondly, as I (LC) was an undergraduate student while my supervisors (CCYW and HZ) ran the study, I had to delete column which could make participants identifiable. As such I removed two columns from the file.
#remove k-number and emails for confidentiality
wave1 <- within(wave1, rm(Q14, Q15))
dim(wave1)
## [1] 444 269
#[1] 444 269
I computed all scores for each questionnaire used and relabelled descriptive statistics and other categorical variables.
# Creating the variables ####
library(psych)
library(MASS)
library(tidyr)
library(tidyverse)
library(dplyr)
library(htmlwidgets)
library(plotly)
library(ggsci)
library(ggpubr)
library(ggpattern)
library(jtools)
library(moments)
#first questions
#Kings student?
wave1$KCL <- recode(wave1$Q1, "1" = "yes", "2" = "no", "3" = "graduate")
head(wave1$KCL)
## [1] "yes" "yes" "yes" "yes" "yes" "yes"
#1] "yes" "yes" "yes" "yes" "yes" "yes"
#over 18?
wave1$age18 <- recode(wave1$Q2, "1"="yes", "2"="no")
head(wave1$age18)
## [1] "yes" "yes" "yes" "yes" "yes" "yes"
#1] "yes" "yes" "yes" "yes" "yes" "yes"
#undergrad or postgrad?
wave1$UGPG <- recode(wave1$Q3, "1"="UG", "2"="PG")
head(wave1$UGPG)
## [1] "PG" "PG" "UG" "PG" "UG" "UG"
#1] "PG" "PG" "UG" "PG" "UG" "UG"
#year
wave1$year <- wave1$Q4
head(wave1$year)
## [1] "4" "3" "1" "1" "1" "4"
#1] "4" "3" "1" "1" "1" "4"
#faculty
wave1$faculty <- recode(wave1$Q5, "1"="A&H", "2"="Dentistry", "3"="LSM", "4"="NMS", "5"="Nursing", "6"="IoPPN", "7"="Business", "8"="Law", "9"="SSPP")
head(wave1$faculty)
## [1] "LSM" "LSM" "A&H" "IoPPN" "IoPPN" "LSM"
#1] "LSM" "LSM" "A&H" "IoPPN" "IoPPN" "LSM"
#Demographics
#gender
wave1$gender <- recode(wave1$Q16, "1"="male", "2"="female", "3"="non-binary", "4"="other", "5"="prefer not to say")
head(wave1$gender)
## [1] "female" "female" "female" "female" "female" "female"
#[1] "female" "female" "female" "female" "female" "female"
#transgender
wave1$transgender <- recode(wave1$Q17, "1"="transgender", "2"="cisgender")
head(wave1$transgender)
## [1] "cisgender" "cisgender" "cisgender" "cisgender" "cisgender" "cisgender"
#[1] "cisgender" "cisgender" "cisgender" "cisgender" "cisgender" "cisgender"
#sexual orientation - NOTE this needs to be recoded in next version because we added some options
wave1$orientation<- recode(wave1$Q18, "1"="heterosexual", "2"="mostly straight", "3"="bisexual", "6" = "mostly gay", "7"="gay/lesbian", "4" = "other", "5" ="prefer not to say")
head(wave1$orientation)
## [1] "heterosexual" "heterosexual" "mostly straight"
## [4] "bisexual" "prefer not to say" "heterosexual"
#[1] "heterosexual" "heterosexual" "mostly straight" "bisexual" "prefer not to say" "heterosexual"
#ethnicity
wave1$ethnicity<- recode(wave1$Q19, "1"="White", "2"="Asian", "3"="Black", "4"="Mixed", "5"="Other", "6"="prefer not to say")
head(wave1$ethnicity)
## [1] "White" "White" "White" "White" "Mixed" "White"
#[1] "White" "White" "White" "White" "Mixed" "White"
#student status
wave1$student.status <- recode(wave1$Q21, "1"="home", "2"="EU", "3"="overseas")
head(wave1$student.status)
## [1] "EU" "EU" "home" "overseas" "home" "home"
#[1] "EU" "EU" "home" "overseas" "home" "home"
#age
wave1$age <- wave1$Q20
#disability
wave1$disability <- recode(wave1$Q22, "1"="disability", "2"="no disability", "3"="prefer not to say")
head(wave1$disability)
## [1] "no disability" "disability" "no disability" "disability"
## [5] "no disability" "no disability"
#[1] "no disability" "disability" "no disability" "disability" "no disability" "no disability"
#learning disability - NOTE needs to be recoded to allow for multiple selections. Code as LD / no-LD?
wave1$LD <- recode(wave1$Q23, "1"="dyslexia", "2"="dyspraxia", "3"="ADD/ADHD", "4"="ASD", "5"="other", "6"="none")
head(wave1$LD)
## [1] "none" "none" "none" NA "none" "none"
#[1] "none" "none" "none" NA "none" "none"
#- Accommodation Q24 - column 42
# grepl return whether x-value is in the cells of a specified column
wave1$accomodation <- recode(wave1$Q24, "1"="halls", "2"="rented", "3"="family", "4"="own", "5"="other" )
head(wave1$accomodation)
## [1] "rented" "rented" "other" "halls" "halls" "rented"
wave1$hm_KCL <- grepl("1", wave1$Q25)
wave1$hm_students <- grepl("2", wave1$Q25)
wave1$hm_friends <- grepl("3", wave1$Q25)
wave1$hm_family <- grepl("4", wave1$Q25)
wave1$hm_partner <- grepl("5", wave1$Q25)
wave1$hm_alone <- grepl("6", wave1$Q25)
wave1$hm_other <- grepl("7", wave1$Q25)
head(wave1$hm_other)
## [1] TRUE FALSE FALSE FALSE FALSE FALSE
#[1] TRUE FALSE FALSE FALSE FALSE FALSE
#commute - Q27
wave1$commute <- recode(wave1$Q27, "1"="15", "2"="30", "3"="45", "4"="60",
"5"="75", "6"="90","7"="105", "8"="120+")
head(wave1$commute)
## [1] "30" "30" "105" "15" "15" "30"
#[1] "30" "30" "105" "15" "15" "30"
#-Job - Q29
wave1$employed <- recode(wave1$Q29, "1"="yes", "2"="no")
head(wave1$employed)
## [1] "no" "no" "no" "no" "no" "yes"
#[1] "no" "no" "no" "no" "no" "yes"
wave1$Q31 <- recode(wave1$Q31, "1"="no interference", "2"="some interference", "3"="interference")
head(wave1$Q31)
## [1] NA NA NA NA
## [5] NA "no interference"
#[1] NA NA NA NA NA "no interference"
#Past mental health - Q83 = past mental distress? column number 111
wave1$Q83<- recode(wave1$Q83, "1"="yes", "2"="no", "3"="prefer not to say")
head(wave1$Q83)
## [1] "no" "yes" "yes" "yes" "yes" "yes"
#[1] "no" "yes" "yes" "yes" "yes" "yes"
#Q84 - past help-seeking. Column number 112
wave1$Q84<- recode(wave1$Q84, "1"="yes", "2"="no", "3"="prefer not to say")
head(wave1$Q84)
## [1] "no" "yes" "yes" "yes" "yes" "yes"
#[1] "no" "yes" "yes" "yes" "yes" "yes"
#make new column for each diagnosis with true / false if that diagnosis is selected
#did not wrote the code that wasn’t working for Lauren
wave1$diag_depression <- grepl("1", wave1$Q85)
wave1$diag_mania <- grepl("2", wave1$Q85)
wave1$diag_GAD <- grepl("3", wave1$Q85)
wave1$diag_socialanx <- grepl("4", wave1$Q85)
wave1$diag_agoraphobia <- grepl("5", wave1$Q85)
wave1$diag_panic <- grepl("6", wave1$Q85)
wave1$diag_OCD <- grepl("7", wave1$Q85)
wave1$diag_anorexia <- grepl("8", wave1$Q85)
wave1$diag_bulimia <- grepl("9", wave1$Q85)
wave1$diag_binge <- grepl("10", wave1$Q85)
wave1$diag_schizophrenia <- grepl("11", wave1$Q85)
wave1$diag_psychosis <- grepl("12", wave1$Q85)
wave1$diag_PD <- grepl("13", wave1$Q85)
wave1$diag_autism <- grepl("14", wave1$Q85)
wave1$diag_ADHD <- grepl("15", wave1$Q85)
#making a binary variable of past diagnosis
#recoding past mental health diagnoses - columns 302 - 316
wave1$past.diagnosis <- FALSE
wave1$past.diagnosis[wave1$diag_depression == TRUE] <- TRUE
wave1$past.diagnosis[wave1$diag_mania == TRUE] <- TRUE
wave1$past.diagnosis[wave1$diag_GAD == TRUE] <- TRUE
wave1$past.diagnosis[wave1$diag_socialanx == TRUE] <- TRUE
wave1$past.diagnosis[wave1$diag_agoraphobia == TRUE] <- TRUE
wave1$past.diagnosis[wave1$diag_panic == TRUE] <- TRUE
wave1$past.diagnosis[wave1$diag_OCD == TRUE] <- TRUE
wave1$past.diagnosis[wave1$diag_anorexia == TRUE] <- TRUE
wave1$past.diagnosis[wave1$diag_bulimia == TRUE] <- TRUE
wave1$past.diagnosis[wave1$diag_binge == TRUE] <- TRUE
wave1$past.diagnosis[wave1$diag_schizophrenia == TRUE] <- TRUE
wave1$past.diagnosis[wave1$diag_psychosis == TRUE] <- TRUE
wave1$past.diagnosis[wave1$diag_PD == TRUE]<- TRUE
wave1$past.diagnosis[wave1$diag_autism == TRUE] <- TRUE
wave1$past.diagnosis[wave1$diag_ADHD == TRUE] <- TRUE
head(wave1$past.diagnosis)
## [1] FALSE TRUE TRUE TRUE TRUE FALSE
## [1] FALSE TRUE TRUE TRUE TRUE FALSE
#- Age and relation to uni
wave1$Q87<- recode(wave1$Q87, "1"="before", "2"="after")
head(wave1$Q87)
## [1] NA "after" "before" NA NA NA
#[1] NA "after" "before" NA NA NA
wave1$Q88<- recode(wave1$Q88, "1"="improved", "2"="same", "3"="worse")
head(wave1$Q88)
## [1] NA "worse" "worse" NA NA NA
#[1] NA "worse" "worse" NA NA NA
wave1$Q90<- recode(wave1$Q90, "1"="before", "2"="after")
head(wave1$Q90)
## [1] NA NA "before" NA NA NA
#[1] NA NA "before" NA NA NA
wave1$Q91<- recode(wave1$Q91, "1"="improved", "2"="same", "3"="worse")
head(wave1$Q91)
## [1] NA NA "worse" NA NA NA
#[1] NA NA "worse" NA NA NA
wave1$Q93<- recode(wave1$Q93, "1"="before", "2"="after")
head(wave1$Q93)
## [1] NA "after" "before" "before" "before" NA
#[1] NA "after" "before" "before" "before" NA
wave1$Q94<- recode(wave1$Q94, "1"="improved", "2"="same", "3"="worse")
head(wave1$Q94)
## [1] NA "worse" "worse" "worse" "same" NA
#[1] NA "worse" "worse" "worse" "same" NA
wave1$Q96<- recode(wave1$Q96, "1"="before", "2"="after")
head(wave1$Q96)
## [1] NA NA "before" "before" NA NA
#[1] NA NA "before" "before" NA NA
wave1$Q97<- recode(wave1$Q97, "1"="improved", "2"="same", "3"="worse")
head(wave1$Q97)
## [1] NA NA "same" "same" NA NA
#[1] NA NA "same" "same" NA NA
wave1$Q99<- recode(wave1$Q99, "1"="before", "2"="after")
head(wave1$Q99)
## [1] NA NA NA NA NA NA
#[1] NA NA NA NA NA NA
wave1$Q100<- recode(wave1$Q100, "1"="improved", "2"="same", "3"="worse")
head(wave1$Q100)
## [1] NA NA NA NA NA NA
#[1] NA NA NA NA NA NA
wave1$Q102<- recode(wave1$Q102, "1"="before", "2"="after")
head(wave1$Q102)
## [1] NA NA "before" "before" NA NA
#[1] NA NA "before" "before" NA NA
wave1$Q103<- recode(wave1$Q103, "1"="improved", "2"="same", "3"="worse")
head(wave1$Q103)
## [1] NA NA "same" "same" NA NA
#[1] NA NA "same" "same" NA NA
wave1$Q105<- recode(wave1$Q105, "1"="before", "2"="after")
head(wave1$Q105)
## [1] NA NA NA NA NA NA
#[1] NA NA NA NA NA NA
wave1$Q106<- recode(wave1$Q106, "1"="improved", "2"="same", "3"="worse")
head(wave1$Q106)
## [1] NA NA NA NA NA NA
#[1] NA NA NA NA NA NA
wave1$Q108<- recode(wave1$Q108, "1"="before", "2"="after")
head(wave1$Q108)
## [1] NA NA NA NA NA NA
#[1] NA NA NA NA NA NA
wave1$Q109<- recode(wave1$Q109, "1"="improved", "2"="same", "3"="worse")
head(wave1$Q109)
## [1] NA NA NA NA NA NA
#[1] NA NA NA NA NA NA
wave1$Q111<- recode(wave1$Q111, "1"="before", "2"="after")
head(wave1$Q111)
## [1] NA NA "before" NA NA NA
#[1] NA NA "before" NA NA NA
wave1$Q112<- recode(wave1$Q112, "1"="improved", "2"="same", "3"="worse")
head(wave1$Q112)
## [1] NA NA "improved" NA NA NA
#[1] NA NA "improved" NA NA NA
wave1$Q114<- recode(wave1$Q114, "1"="before", "2"="after")
head(wave1$Q114)
## [1] NA NA "before" NA NA NA
#[1] NA NA "before" NA NA NA
wave1$Q115<- recode(wave1$Q115, "1"="improved", "2"="same", "3"="worse")
head(wave1$Q115)
## [1] NA NA "improved" NA NA NA
#[1] NA NA "improved" NA NA NA
wave1$Q117<- recode(wave1$Q117, "1"="before", "2"="after")
head(wave1$Q117)
## [1] NA NA NA NA NA NA
#[1] NA NA NA NA NA NA
wave1$Q118<- recode(wave1$Q118, "1"="improved", "2"="same", "3"="worse")
head(wave1$Q118)
## [1] NA NA NA NA NA NA
#[1] NA NA NA NA NA NA
wave1$Q120<- recode(wave1$Q120, "1"="before", "2"="after")
head(wave1$Q120)
## [1] NA NA NA NA NA NA
#[1] NA NA NA NA NA NA
wave1$Q121<- recode(wave1$Q121, "1"="improved", "2"="same", "3"="worse")
head(wave1$Q121)
## [1] NA NA NA NA NA NA
#[1] NA NA NA NA NA NA
wave1$Q123<- recode(wave1$Q123, "1"="before", "2"="after")
head(wave1$Q123)
## [1] NA NA NA NA NA NA
#[1] NA NA NA NA NA NA
wave1$Q124<- recode(wave1$Q124, "1"="improved", "2"="same", "3"="worse")
head(wave1$Q124)
## [1] NA NA NA NA NA NA
#[1] NA NA NA NA NA NA
wave1$Q126<- recode(wave1$Q126, "1"="before", "2"="after")
head(wave1$Q126)
## [1] NA NA NA NA NA NA
#[1] NA NA NA NA NA NA
wave1$Q127<- recode(wave1$Q127, "1"="improved", "2"="same", "3"="worse")
head(wave1$Q127)
## [1] NA NA NA NA NA NA
#[1] NA NA NA NA NA NA
wave1$Q129<- recode(wave1$Q129, "1"="before", "2"="after")
head(wave1$Q129)
## [1] NA NA NA NA NA NA
#[1] NA NA NA NA NA NA
wave1$Q130<- recode(wave1$Q130, "1"="improved", "2"="same", "3"="worse")
head(wave1$Q130)
## [1] NA NA NA NA NA NA
#[1] NA NA NA NA NA NA
#Treatment Q131
wave1$tx_medication <- grepl("1", wave1$Q131)
wave1$tx_therapy <- grepl("2", wave1$Q131)
wave1$tx_admission <- grepl("3", wave1$Q131)
wave1$tx_other <- grepl("4", wave1$Q131)
wave1$tx_none <- grepl("5", wave1$Q131)
#-Placement - Q32
wave1$placement <- recode(wave1$Q32, "1"="yes", "2"="no")
head(wave1$placement)
## [1] "no" "no" "no" "no" "no" "no"
#[1] "no" "no" "no" "no" "no" "no"
#Social life before uni
wave1$relocation <- recode(wave1$Q34, "1"="relocated UK", "2"="relocated London", "3"="relocated international", "4"="no",)
head(wave1$relocation)
## [1] "relocated international" "relocated international"
## [3] "no" "relocated international"
## [5] "relocated international" "relocated UK"
#[1] "relocated international" "relocated international" "no" "relocated international" "relocated international"
#[6] "relocated UK"
wave1$Q35 <- recode(wave1$Q35, "1"="once a day", "2"="few times a week", "3"="once a week", "4"="few times a month", "5"="once a month or less")
head(wave1$Q35)
## [1] "once a week" "once a day" NA "once a day"
## [5] "few times a week" "once a day"
# [1] "once a week" "once a day" NA "once a day" "few times a week" "once a day"
#- UCLA loneliness scale Q36, Q37, Q38
#control the names pf the columns
colnames(wave1)
## [1] "StartDate" "EndDate" "Status"
## [4] "IPAddress" "Progress" "Duration..in.seconds."
## [7] "Finished" "RecordedDate" "ResponseId"
## [10] "RecipientLastName" "RecipientFirstName" "RecipientEmail"
## [13] "ExternalReference" "LocationLatitude" "LocationLongitude"
## [16] "DistributionChannel" "UserLanguage" "Q1"
## [19] "Q2" "Q3" "Q4"
## [22] "Q5" "Q8" "Q9"
## [25] "Q11" "Q12" "Q13"
## [28] "Q16" "Q16_4_TEXT" "Q17"
## [31] "Q18" "Q18_4_TEXT" "Q19"
## [34] "Q19_5_TEXT" "Q20" "Q21"
## [37] "Q22" "Q23" "Q23_5_TEXT"
## [40] "Q24" "Q25" "Q26"
## [43] "Q27" "Q28" "Q29"
## [46] "Q30" "Q31" "Q32"
## [49] "Q33" "Q34" "Q35"
## [52] "Q36" "Q37" "Q38"
## [55] "Q39" "Q40" "Q41"
## [58] "Q42" "Q43" "Q44"
## [61] "Q45" "Q46" "Q47"
## [64] "Q48" "Q49_1" "Q49_2"
## [67] "Q50" "Q51" "Q53"
## [70] "Q54_1" "Q54_2" "Q55"
## [73] "Q55_0_TEXT" "Q56_1" "Q56_2"
## [76] "Q57" "Q58_1" "Q58_2"
## [79] "Q59_1" "Q59_2" "Q60"
## [82] "Q61" "Q62" "Q217"
## [85] "Q63" "Q64" "Q65"
## [88] "Q66" "Q67" "Q68"
## [91] "Q69" "Q70" "Q71"
## [94] "Q72" "Q73" "Q74"
## [97] "Q75_1" "Q75_2" "Q75_3"
## [100] "Q75_4" "Q75_5" "Q75_6"
## [103] "Q75_7" "Q75_8" "Q76"
## [106] "Q77" "Q78" "Q79"
## [109] "Q80" "Q81" "Q218"
## [112] "Q82" "Q83" "Q84"
## [115] "Q85" "Q86" "Q87"
## [118] "Q88" "Q89" "Q90"
## [121] "Q91" "Q92" "Q93"
## [124] "Q94" "Q95" "Q96"
## [127] "Q97" "Q98" "Q99"
## [130] "Q100" "Q101" "Q102"
## [133] "Q103" "Q104" "Q105"
## [136] "Q106" "Q107" "Q108"
## [139] "Q109" "Q110" "Q111"
## [142] "Q112" "Q113" "Q114"
## [145] "Q115" "Q116" "Q117"
## [148] "Q118" "Q119" "Q120"
## [151] "Q121" "Q122" "Q123"
## [154] "Q124" "Q125" "Q126"
## [157] "Q127" "Q128" "Q129"
## [160] "Q130" "Q131" "Q131_4_TEXT"
## [163] "Q132_1" "Q132_2" "Q132_3"
## [166] "Q132_4" "Q132_5" "Q132_6"
## [169] "Q132_7" "Q133_1" "Q133_2"
## [172] "Q133_3" "Q133_4" "Q133_5"
## [175] "Q133_6" "Q133_7" "Q133_8"
## [178] "Q133_9" "Q136" "Q137"
## [181] "Q138" "Q140_1" "Q140_2"
## [184] "Q140_3" "Q140_4" "Q140_5"
## [187] "Q140_6" "Q140_7" "Q140_8"
## [190] "Q140_9" "Q140_10" "Q140_11"
## [193] "Q140_12" "Q140_13" "Q140_14"
## [196] "Q141" "Q142" "Q143"
## [199] "Q144" "Q220" "Q145"
## [202] "Q146" "Q148" "Q149"
## [205] "Q150" "Q151" "Q152"
## [208] "Q153" "Q154" "Q155"
## [211] "Q156" "Q157_1" "Q157_2"
## [214] "Q157_3" "Q157_4" "Q157_5"
## [217] "Q157_6" "Q157_7" "Q159"
## [220] "Q160" "Q161" "Q162"
## [223] "Q163" "Q164" "Q165"
## [226] "Q166" "Q167" "Q168"
## [229] "Q169" "Q221" "Q170"
## [232] "Q171" "Q172" "Q173"
## [235] "Q174" "Q175" "Q176"
## [238] "Q178" "Q179" "Q180"
## [241] "Q181" "Q182" "Q183"
## [244] "Q184" "Q185" "Q186"
## [247] "Q187" "Q188" "Q189"
## [250] "Q190" "Q191" "Q192"
## [253] "Q193" "Q194" "Q195"
## [256] "Q196" "Q197" "Q198"
## [259] "Q199" "Q200" "Q201"
## [262] "Q202" "Q203" "Q204"
## [265] "Q207" "Q209" "Q212"
## [268] "Q214" "Q216" "KCL"
## [271] "age18" "UGPG" "year"
## [274] "faculty" "gender" "transgender"
## [277] "orientation" "ethnicity" "student.status"
## [280] "age" "disability" "LD"
## [283] "accomodation" "hm_KCL" "hm_students"
## [286] "hm_friends" "hm_family" "hm_partner"
## [289] "hm_alone" "hm_other" "commute"
## [292] "employed" "diag_depression" "diag_mania"
## [295] "diag_GAD" "diag_socialanx" "diag_agoraphobia"
## [298] "diag_panic" "diag_OCD" "diag_anorexia"
## [301] "diag_bulimia" "diag_binge" "diag_schizophrenia"
## [304] "diag_psychosis" "diag_PD" "diag_autism"
## [307] "diag_ADHD" "past.diagnosis" "tx_medication"
## [310] "tx_therapy" "tx_admission" "tx_other"
## [313] "tx_none" "placement" "relocation"
#To use the sapply() function in R, you have to define the List or Vector you want to iterate on the first parameter and the function you want to apply to each vector element in the second argument.
wave1[, c(52:54)] <- sapply(wave1[, c(52:54)], as.numeric, is.na=NA)
str(wave1$Q36)
## num [1:444] 1 2 3 2 2 1 3 2 1 2 ...
#chr [1:444] "1" "2" "3" "2" "2" "1" "3" "2" "1" "2" "2" "1" "3" "1" "2" "2" "3" "3" "2" "1" "2" "2" "3" "1" "2" "1" "2" "2" "3" "1" "1" "1" "1" "2" ...
head(wave1$Q36)
## [1] 1 2 3 2 2 1
## [1] 1 2 3 2 2 1
#The rowSums() is a built-in R function used to calculate the sum of rows of a matrix or an array. The rowSums() method takes an R Object-like matrix or array and returns the sum of rows.
wave1$pre.loneliness<- rowSums(wave1[,c(52:54)], na.rm = TRUE)*NA^!rowSums(!is.na(wave1[,c(52:54)]))
str(wave1$pre.loneliness)
## num [1:444] 3 6 9 6 6 5 9 4 3 6 ...
#num [1:444] 3 6 9 6 6 5 9 4 3 6 ...
head(wave1$pre.loneliness)
## [1] 3 6 9 6 6 5
#[1] 3 6 9 6 6 5
#Social life at uni
#- Questions
wave1$Q39 <- recode(wave1$Q39, "5"="more than once a day", "4"="once a day", "3"="3-6 times per week", "2"="1-2 times per week", "1"="less than once a week")
head(wave1$Q39)
## [1] "3-6 times per week" "3-6 times per week" "less than once a week"
## [4] "1-2 times per week" "once a day" "3-6 times per week"
#[1] "3-6 times per week" "3-6 times per week" "less than once a week" "1-2 times per week" "once a day" "3-6 times per week"
wave1$Q40 <- recode(wave1$Q40,"7"="more than 10 times a day", "6"="6-10 times a day", "5"="2-5 times a day", "4"="once a day", "3"="3-6 times per week", "2"="1-2 times per week", "1"="less than once a week")
head(wave1$Q40)
## [1] "3-6 times per week" "2-5 times a day"
## [3] "1-2 times per week" "6-10 times a day"
## [5] "6-10 times a day" "more than 10 times a day"
#[1] "3-6 times per week" "2-5 times a day" "1-2 times per week" "6-10 times a day" "6-10 times a day"
#[6] "more than 10 times a day"
wave1$Q41 <- recode(wave1$Q41, "10"="10+")
head(wave1$Q41)
## [1] "3" "1" "0" "1" "2" "0"
#[1] "3" "1" "0" "1" "2" "0"
#what about42 and 43??
#- UCLA loneliness scale
#recode column (q45-q47,-2)
wave1[, c(61:63)] <- sapply(wave1[, c(61:63)], as.numeric, is.na=NA)
wave1$uni.loneliness<- rowSums(wave1[,c(61:63)], na.rm = TRUE)*NA^!rowSums(!is.na(wave1[,c(61:63)]))
#Relationships Q48-Q51
wave1$Q48B <- recode(wave1$Q48, "1"="single", "2"="dating non-exclusively", "3"="exclusive relationship", "4"="co-habitating", "5"="married", "6"="widowed", "7"="separated", "8"="divorced")
head(wave1$Q48B)
## [1] "co-habitating" "single" "co-habitating"
## [4] "exclusive relationship" "single" "exclusive relationship"
#[1] "co-habitating" "single" "co-habitating" "exclusive relationship" "single" "exclusive relationship"
wave1$relationship.status <- recode(wave1$Q48, "1"="no", "2"="yes", "3"="yes", "4"="yes", "5"="yes", "6"= "no", "7" = "no", "8" ="no")
head(wave1$relationship.status)
## [1] "yes" "no" "yes" "yes" "no" "yes"
#[1] "yes" "no" "yes" "yes" "no" "yes"
wave1$Q49_1 <- as.numeric(wave1$Q49_1)
wave1$Q49_2 <- as.numeric(wave1$Q49_2)
wave1$relationship.months <- (wave1$Q49_1*12)+wave1$Q49_2
head(wave1$relationship.months)
## [1] 26 NA 25 NA NA 13
#[1] 26 NA 25 NA NA 13
wave1$Q50 <- recode(wave1$Q50, "1"="before", "2"="after")
head(wave1$Q50)
## [1] "after" NA "before" "before" NA "after"
#[1] "after" NA "before" "before" NA "after"
wave1$Q51 <- recode(wave1$Q51, "1"="LDR", "2"="non-LDR")
head(wave1$Q51)
## [1] NA NA NA "LDR" NA "non-LDR"
#[1] NA NA NA "LDR" NA "non-LDR"
#Physical activity Q53-Q59_2 (69:80)
#vigorous activity Q53-Q54_2- first calculate time in minutes, then multiply by days
wave1[, c(69:71)] <- sapply(wave1[, c(69:71)], as.numeric, is.na=NA)
wave1$v.mins <- (wave1$Q54_1*60) + wave1$Q54_2
head(wave1$v.mins)
## [1] 60 30 NA NA 0 40
#[1] 60 30 NA NA 0 40
wave1$ipaq.v <- wave1$v.mins*wave1$Q53
head(wave1$ipaq.v)
## [1] 60 60 NA NA 0 120
#[1] 60 60 NA NA 0 120
#moderate activity Q55 - Q56_2 (col 73 empty)
wave1[, c(72, 74, 75)] <- sapply(wave1[, c(72, 74, 75)], as.numeric, is.na=NA)
wave1$m.mins <- (wave1$Q56_1*60) + wave1$Q56_2
head(wave1$m.mins)
## [1] 120 30 NA NA 0 0
#[1] 120 30 NA NA 0 0
wave1$ipaq.m <- wave1$m.mins*wave1$Q55
head(wave1$ipaq.m)
## [1] 360 60 NA NA 0 0
#[1] 360 60 NA NA 0 0
#walking Q57 - Q58_2
wave1[, c(76:78)] <- sapply(wave1[, c(76:78)], as.numeric, is.na=NA)
wave1$w.mins <- (wave1$Q58_1*60) + wave1$Q58_2
head(wave1$w.mins)
## [1] 60 30 NA NA 30 60
#[1] 60 30 NA NA 30 60
wave1$ipaq.walk <- wave1$w.mins*wave1$Q55
head(wave1$ipaq.walk)
## [1] 180 60 NA NA 0 0
#[1] 180 60 NA NA 0 0
#sitting (per day instead of per week)
wave1[, c(79, 80)] <- sapply(wave1[, c(79, 80)], as.numeric, is.na=NA)
wave1$ipaq.sit <- (wave1$Q59_1*60) + wave1$Q59_2
head(wave1$ipaq.sit)
## [1] 420 420 NA NA NA 300
#[1] 420 420 NA NA NA 300
#Academic
#- Questions
#attendance - Q64
wave1$Q64 <- recode(wave1$Q64, "0"="0", "1"="10", "2"="20", "3"="30", "4"="40", "5"="50",
"6"="60", "7"="70", "8"="80", "9"="90", "10"="100")
head(wave1$Q64)
## [1] "100" "10" "90" "100" "100" "100"
#[1] "100" "10" "90" "100" "100" "100"
#--NOTE---
#quality control item Q217 appears at column 84
#- Procrastination - Q65 - Q70, column numbers: 87-92
wave1[, c(87:92)] <- sapply(wave1[, c(87:92)], as.numeric, is.na=NA)
#There were 42 warnings (use warnings() to see them)
wave1$procrastination<- rowSums(wave1[,c(87:92)], na.rm = TRUE)*NA^!rowSums(!is.na(wave1[,c(87:92)]))
str(wave1$procrastination)
## num [1:444] 10 22 6 23 21 21 24 18 24 14 ...
## num [1:444] 10 22 6 23 21 21 24 18 24 14 ...
head(wave1$procrastination)
## [1] 10 22 6 23 21 21
## [1] 10 22 6 23 21 21
#Accommodation
#Finances
#- Funding
wave1$Q75_1 <- recode(wave1$Q75_1, "1"="none", "2"="less than half", "3"="half", "4"="more than half", "5"="all")
head(wave1$Q75_1)
## [1] "none" "none" "all" NA "none" "none"
#[1] "none" "none" "all" NA "none" "none"
wave1$Q75_2 <- recode(wave1$Q75_2, "1"="none", "2"="less than half", "3"="half", "4"="more than half", "5"="all")
head(wave1$Q75_2)
## [1] "more than half" "none" "none" NA
## [5] "none" "none"
#[1] "more than half" "none" "none" NA "none" "none"
wave1$Q75_3 <- recode(wave1$Q75_3, "1"="none", "2"="less than half", "3"="half", "4"="more than half", "5"="all")
head(wave1$Q75_3)
## [1] "none" "all" "none" NA "all" "none"
#[1] "none" "all" "none" NA "all" "none"
wave1$Q75_4 <- recode(wave1$Q75_4, "1"="none", "2"="less than half", "3"="half", "4"="more than half", "5"="all")
head(wave1$Q75_4)
## [1] "less than half" NA "less than half" "less than half"
## [5] "less than half" "less than half"
#[1] "less than half" NA "less than half" "less than half" "less than half" "less than half"
wave1$Q75_5 <- recode(wave1$Q75_5, "1"="none", "2"="less than half", "3"="half", "4"="more than half", "5"="all")
head(wave1$Q75_5)
## [1] "half" "less than half" "none" "more than half"
## [5] "none" "more than half"
#[1] "half" "less than half" "none" "more than half" "none" "more than half"
wave1$Q75_6 <- recode(wave1$Q75_6, "1"="none", "2"="less than half", "3"="half", "4"="more than half", "5"="all")
head(wave1$Q75_6)
## [1] "less than half" "none" "less than half" NA
## [5] "none" "none"
#[1] "less than half" "none" "less than half" NA "none" "none"
wave1$Q75_7 <- recode(wave1$Q75_7, "1"="none", "2"="less than half", "3"="half", "4"="more than half", "5"="all")
head(wave1$Q75_7)
## [1] "none" "none" "none" NA "none" "none"
#[1] "none" "none" "none" NA "none" "none"
wave1$Q75_8 <- recode(wave1$Q75_8, "1"="none", "2"="less than half", "3"="half", "4"="more than half", "5"="all")
head(wave1$Q75_8)
## [1] "none" "none" "none" NA
## [5] "none" "less than half"
#[1] "none" "none" "none" NA "none" "less than half"
wave1$Q76 <- recode(wave1$Q76, "1"="none", "2"="less £10k", "3"="£10k-£30k", "4"="£30k-£50k", "5"="£50k+")
head(wave1$Q76)
## [1] "less £10k" "none" "£30k-£50k" "none" "none" "£10k-£30k"
#[1] "less £10k" "none" "£30k-£50k" "none" "none" "£10k-£30k"
wave1$Q77 <- recode(wave1$Q77, "1"="not stressed", "2"="a little stressed", "3"="quite stressed", "4"="very stressed")
head(wave1$Q77)
## [1] "not stressed" NA "not stressed" NA NA
## [6] "not stressed"
#[1] "not stressed" NA "not stressed" NA NA "not stressed"
wave1$Q78 <- recode(wave1$Q78, "1"="yes", "2"="no")
head(wave1$Q78)
## [1] "no" "no" "no" "no" "no" "no"
#[1] "no" "no" "no" "no" "no" "no"
wave1$Q79 <- recode(wave1$Q79, "1"="yes", "2"="no")
head(wave1$Q79)
## [1] "no" "no" "yes" "no" "no" "no"
#[1] "no" "no" "yes" "no" "no" "no"
#- Perceptions
#GAD-7 - scoring, severity and above clinical cut-off - Q132_1 - Q132_7, columns 163 - 169
wave1$Q132_1[wave1$Q132_1 == ""] <- "NA"
wave1$Q132_2[wave1$Q132_2 == ""] <- "NA"
wave1$Q132_3[wave1$Q132_3 == ""] <- "NA"
wave1$Q132_4[wave1$Q132_4 == ""] <- "NA"
wave1$Q132_5[wave1$Q132_5 == ""] <- "NA"
wave1$Q132_6[wave1$Q132_6 == ""] <- "NA"
wave1$Q132_7[wave1$Q132_7 == ""] <- "NA"
wave1[, c(163:169)] <- sapply(wave1[, c(163:169)], as.numeric, is.na=NA)
#There were 40 warnings (use warnings() to see them)
wave1$GAD<- rowSums(wave1[,c(163:169)], na.rm = TRUE)*NA^!rowSums(!is.na(wave1[,c(163:169)]))
str(wave1$GAD)
## num [1:444] 0 16 18 13 2 3 7 3 10 5 ...
## num [1:444] 0 16 18 13 2 3 7 3 10 5 ...
head(wave1$GAD)
## [1] 0 16 18 13 2 3
## [1] 0 16 18 13 2 3
wave1$GADseverity <- 'NA'
wave1$GADseverity[wave1$GAD==0] <- 'none'
wave1$GADseverity[wave1$GAD>0] <- 'none'
wave1$GADseverity[wave1$GAD>4] <- 'mild'
wave1$GADseverity[wave1$GAD>9] <- 'moderate'
wave1$GADseverity[wave1$GAD>14] <- 'severe'
head(wave1$GADseverity)
## [1] "none" "severe" "severe" "moderate" "none" "none"
## [1] "none" "severe" "severe" "moderate" "none" "none"
wave1$GADseverity <- as.factor(wave1$GADseverity)
str(wave1$GADseverity)
## Factor w/ 5 levels "mild","moderate",..: 4 5 5 2 4 4 1 4 2 1 ...
# Factor w/ 5 levels "mild","moderate",..: 4 5 5 2 4 4 1 4 2 1 ...
#GAD above clinical cut-off (=8)
wave1$GADclinical <- 'NA'
wave1$GADclinical[wave1$GAD==0] <- 'non-clinical'
wave1$GADclinical[wave1$GAD<8] <- 'non-clinical'
wave1$GADclinical[wave1$GAD>7] <- 'clinical'
head(wave1$GADclinical)
## [1] "non-clinical" "clinical" "clinical" "clinical" "non-clinical"
## [6] "non-clinical"
## [1] "non-clinical" "clinical" "clinical" "clinical" "non-clinical"
## [6] "non-clinical"
wave1$GADclinical <- as.factor(wave1$GADclinical)
str(wave1$GADclinical)
## Factor w/ 3 levels "clinical","NA",..: 3 1 1 1 3 3 3 3 1 3 ...
## Factor w/ 3 levels "clinical","NA",..: 3 1 1 1 3 3 3 3 1 3 ...
#PHQ-9 - questions Q133_1 to Q133_9, colnames = 170 - 178
wave1$Q133_1[wave1$Q133_1 == ""] <- "NA"
wave1$Q133_2[wave1$Q133_2 == ""] <- "NA"
wave1$Q133_3[wave1$Q133_3 == ""] <- "NA"
wave1$Q133_4[wave1$Q133_4 == ""] <- "NA"
wave1$Q133_5[wave1$Q133_5 == ""] <- "NA"
wave1$Q133_6[wave1$Q133_6 == ""] <- "NA"
wave1$Q133_7[wave1$Q133_7 == ""] <- "NA"
wave1$Q133_8[wave1$Q133_8 == ""] <- "NA"
wave1$Q133_9[wave1$Q133_9 == ""] <- "NA"
wave1[, c(170:178)] <- sapply(wave1[, c(170:178)], as.numeric, is.na=NA)
wave1$PHQ<- rowSums(wave1[,c(170:178)], na.rm = TRUE)*NA^!rowSums(!is.na(wave1[,c(170:178)]))
str(wave1$PHQ)
## num [1:444] 0 16 16 12 6 7 16 2 6 2 ...
## num [1:444] 0 16 16 12 6 7 16 2 6 2 ...
head(wave1$PHQ)
## [1] 0 16 16 12 6 7
## [1] 0 16 16 12 6 7
wave1$PHQseverity <- 'NA'
wave1$PHQseverity[wave1$PHQ==0] <- 'none'
wave1$PHQseverity[wave1$PHQ>0] <- 'none'
wave1$PHQseverity[wave1$PHQ>4] <- 'mild'
wave1$PHQseverity[wave1$PHQ>9] <- 'moderate'
wave1$PHQseverity[wave1$PHQ>14] <- 'moderately severe'
wave1$PHQseverity[wave1$PHQ>19] <- 'severe'
head(wave1$PHQseverity)
## [1] "none" "moderately severe" "moderately severe"
## [4] "moderate" "mild" "mild"
## [1] "none" "moderately severe" "moderately severe"
## [4] "moderate" "mild" "mild"
wave1$PHQseverity <- as.factor(wave1$PHQseverity)
str(wave1$PHQseverity)
## Factor w/ 6 levels "mild","moderate",..: 5 3 3 2 1 1 3 5 1 5 ...
## Factor w/ 6 levels "mild","moderate",..: 5 3 3 2 1 1 3 5 1 5 ...
#PHQ above clinical cut-off (=10)
wave1$PHQclinical <- 'NA'
wave1$PHQclinical[wave1$PHQ==0] <- 'non-clinical'
wave1$PHQclinical[wave1$PHQ<10] <- 'non-clinical'
wave1$PHQclinical[wave1$PHQ>=10] <- 'clinical'
head(wave1$PHQclinical)
## [1] "non-clinical" "clinical" "clinical" "clinical" "non-clinical"
## [6] "non-clinical"
## [1] "non-clinical" "clinical" "clinical" "clinical" "non-clinical"
## [6] "non-clinical"
wave1$PHQclinical <- as.factor(wave1$PHQclinical)
str(wave1$PHQclinical)
## Factor w/ 3 levels "clinical","NA",..: 3 1 1 1 3 3 1 3 3 3 ...
## Factor w/ 3 levels "clinical","NA",..: 3 1 1 1 3 3 1 3 3 3 ...
#SPIN Q136, Q137, Q138 - NOTE: recoded to 0-4 in the real thing. Columns 181 - 183
wave1[, c(179:181)] <- sapply(wave1[, c(179:181)], as.numeric, is.na=NA)
wave1$social.anxiety = rowSums(wave1[,c(179:181)], na.rm=TRUE)*NA^!rowSums(!is.na(wave1[,c(179:181)]))
str(wave1$social.anxiety)
## num [1:444] 2 5 7 7 10 2 8 2 5 0 ...
# num [1:444] 2 5 7 7 10 2 8 2 5 0 ...
head(wave1$social.anxiety)
## [1] 2 5 7 7 10 2
#[1] 2 5 7 7 10 2
#Brief Self-Control Scale - questions 2, 3, 4, 5, 7, 9, 10, 12 & 13 need to be reverse-scored
#question numbers: Q140_1 - Q140_13
#column numbers: 182 - 194
wave1$Q140_2 <- recode(wave1$Q140_2, "1"="5", "2"="4", "3"="3", "4"="2", "5"="1")
head(wave1$Q140_2)
## [1] "2" "1" "3" "2" "2" "2"
#[1] "2" "1" "3" "2" "2" "2"
wave1$Q140_3 <- recode(wave1$Q140_3, "1"="5", "2"="4", "3"="3", "4"="2", "5"="1")
head(wave1$Q140_3)
## [1] "5" "2" "5" "2" "4" "2"
#[1] "5" "2" "5" "2" "4" "2"
wave1$Q140_4 <- recode(wave1$Q140_4, "1"="5", "2"="4", "3"="3", "4"="2", "5"="1")
head(wave1$Q140_4)
## [1] "5" "3" "3" "4" "5" "3"
#[1] "5" "3" "3" "4" "5" "3"
wave1$Q140_5 <- recode(wave1$Q140_5, "1"="5", "2"="4", "3"="3", "4"="2", "5"="1")
head(wave1$Q140_5)
## [1] "5" "5" "3" "4" "4" "4"
#[1] "5" "5" "3" "4" "4" "4"
wave1$Q140_7 <- recode(wave1$Q140_7, "1"="5", "2"="4", "3"="3", "4"="2", "5"="1")
head(wave1$Q140_7)
## [1] "4" "1" "4" "1" "1" "2"
#[1] "4" "1" "4" "1" "1" "2"
wave1$Q140_9 <- recode(wave1$Q140_9, "1"="5", "2"="4", "3"="3", "4"="2", "5"="1")
head(wave1$Q140_9)
## [1] "2" "2" "2" "2" "2" "2"
#[1] "2" "2" "2" "2" "2" "2"
wave1$Q140_10 <- recode(wave1$Q140_10, "1"="5", "2"="4", "3"="3", "4"="2", "5"="1")
head(wave1$Q140_10)
## [1] "4" "4" "5" "2" "3" "3"
#[1] "4" "4" "5" "2" "3" "3"
wave1$Q140_12 <- recode(wave1$Q140_12, "1"="5", "2"="4", "3"="3", "4"="2", "5"="1")
head(wave1$Q140_12)
## [1] "1" "4" "2" "2" "2" "2"
#[1] "1" "4" "2" "2" "2" "2"
wave1$Q140_13 <- recode(wave1$Q140_13, "1"="5", "2"="4", "3"="3", "4"="2", "5"="1")
head(wave1$Q140_13)
## [1] "5" "2" "4" "3" "4" "4"
#[1] "5" "2" "4" "3" "4" "4"
wave1[, c(182:194)] <- sapply(wave1[, c(182:194)], as.numeric, is.na=NA)
wave1$self.control = rowSums(wave1[,c(184:194)], na.rm=TRUE)*NA^!rowSums(!is.na(wave1[,c(184:194)]))
str(wave1$self.control)
## num [1:444] 42 32 35 32 36 30 24 30 39 41 ...
## num [1:444] 42 32 35 32 36 30 24 30 39 41 ...
#AUDIT - unsure re. cut-off point. Work out total of AUDIT-5, plus the added item re. binge-drinking that we included
#Q141 - Q146
#columns 196 - 202
#----------------------NOTE: Quality control item Q220 is column number 200
wave1$Q141[wave1$Q141 == ""] <- "NA"
wave1$Q142[wave1$Q142 == ""] <- "NA"
wave1$Q143[wave1$Q143 == ""] <- "NA"
wave1$Q144[wave1$Q144 == ""] <- "NA"
wave1$Q145[wave1$Q145 == ""] <- "NA"
wave1$Q146[wave1$Q146 == ""] <- "NA"
wave1[, c(196:202)] <- sapply(wave1[, c(196:202)], as.numeric, is.na=NA)
#total - excluding item Q143 because not in the original AUDIT-5
#excluding column 200 because it is a quality control item
wave1$AUDIT = rowSums(wave1[,c(196, 197, 199, 201, 202)], na.rm=TRUE)*NA^!rowSums(!is.na(wave1[,c(196, 197, 199, 201, 202)]))
head(wave1$AUDIT)
## [1] 1 0 4 3 5 5
#[1] 1 0 4 3 5 5
#according to Kim et al (2013) cut-offs are: >2 = problem drinking, >6 = possible alcohol use disorder, >10 = possible alcohol dependence
wave1$alcohol.screening <- 'NA'
wave1$alcohol.screening[wave1$AUDIT==0] <- 'negative'
wave1$alcohol.screening[wave1$AUDIT > 0] <- 'negative'
wave1$alcohol.screening[wave1$AUDIT > 2] <- 'problem drinking'
wave1$alcohol.screening[wave1$AUDIT > 6] <- 'alcohol use disorder'
wave1$alcohol.screening[wave1$AUDIT > 10] <- 'alcohol dependence'
head(wave1$alcohol.screening)
## [1] "negative" "negative" "problem drinking" "problem drinking"
## [5] "problem drinking" "problem drinking"
#[1] "negative" "negative" "problem drinking" "problem drinking" "problem drinking"
#[6] "problem drinking"
#CUDIT - screener = Q148, rest = Q149-Q155; columns 204 - 210
wave1$Q148[wave1$Q148 == ""] <- "NA"
wave1$Q149[wave1$Q149 == ""] <- "NA"
wave1$Q150[wave1$Q150 == ""] <- "NA"
wave1$Q151[wave1$Q151 == ""] <- "NA"
wave1$Q152[wave1$Q152 == ""] <- "NA"
wave1$Q153[wave1$Q153 == ""] <- "NA"
wave1$Q154[wave1$Q154 == ""] <- "NA"
wave1$Q155[wave1$Q155 == ""] <- "NA"
wave1[, c(204:210)] <- sapply(wave1[, c(204:210)], as.numeric, is.na=NA)
wave1$CUDIT = rowSums(wave1[,c(204:210)], na.rm=TRUE)*NA^!rowSums(!is.na(wave1[,c(204:210)]))
head(wave1$CUDIT)
## [1] 0 NA NA 2 NA NA
#[1] 0 NA NA 2 NA NA
#cut-off: 8 or more = hazardous cannabis use, 12 or more indicate possible cannabis use disorder
wave1$cannabis.screening <- 'NA'
wave1$cannabis.screening[wave1$CUDIT==0] <- 'negative'
wave1$cannabis.screening[wave1$CUDIT > 0] <- 'negative'
wave1$cannabis.screening[wave1$CUDIT > 7] <- 'hazardous'
wave1$cannabis.screening[wave1$CUDIT > 11] <- 'cannabis use disorder'
head(wave1$cannabis.screening)
## [1] "negative" "NA" "NA" "negative" "NA" "NA"
#[1] "negative" "NA" "NA" "negative" "NA" "NA"
#Substance use Q156 - Q157_7
wave1$Q156 <- recode(wave1$Q156, "1"="yes", "2"="no")
head(wave1$Q156)
## [1] "no" "no" "yes" "no" "no" "no"
#[1] "no" "no" "yes" "no" "no" "no"
wave1$Q157_1 <- recode(wave1$Q157_1, "0"="no", "1"="once", "2"="2-5 times", "3"="6-10 times", "4"="10+ times")
head(wave1$Q157_1)
## [1] NA NA "10+ times" NA NA NA
#[1] NA NA "10+ times" NA NA NA
wave1$Q157_2 <- recode(wave1$Q157_2, "0"="no", "1"="once", "2"="2-5 times", "3"="6-10 times", "4"="10+ times")
head(wave1$Q157_2)
## [1] NA NA "no" NA NA NA
#[1] NA NA "no" NA NA NA
wave1$Q157_3 <- recode(wave1$Q157_3, "0"="no", "1"="once", "2"="2-5 times", "3"="6-10 times", "4"="10+ times")
head(wave1$Q157_3)
## [1] NA NA "no" NA NA NA
#[1] NA NA "no" NA NA NA
wave1$Q157_4 <- recode(wave1$Q157_4, "0"="no", "1"="once", "2"="2-5 times", "3"="6-10 times", "4"="10+ times")
head(wave1$Q157_4)
## [1] NA NA "once" NA NA NA
#[1] NA NA "once" NA NA NA
wave1$Q157_5 <- recode(wave1$Q157_5, "0"="no", "1"="once", "2"="2-5 times", "3"="6-10 times", "4"="10+ times")
head(wave1$Q157_5)
## [1] NA NA "no" NA NA NA
#[1] NA NA "no" NA NA NA
wave1$Q157_6 <- recode(wave1$Q157_6, "0"="no", "1"="once", "2"="2-5 times", "3"="6-10 times", "4"="10+ times")
head(wave1$Q157_6)
## [1] NA NA "no" NA NA NA
#[1] NA NA "no" NA NA NA
wave1$Q157_7 <- recode(wave1$Q157_7, "0"="no", "1"="once", "2"="2-5 times", "3"="6-10 times", "4"="10+ times")
head(wave1$Q157_7)
## [1] NA NA "no" NA NA NA
#[1] NA NA "no" NA NA NA
#Stress - Q159 - Q162, columns: 219 - 222
wave1[, c(219:222)] <- sapply(wave1[, c(219:222)], as.numeric, is.na=NA)
wave1$perceived.stress = rowSums(wave1[,c(219:222)], na.rm=TRUE)*NA^!rowSums(!is.na(wave1[,c(219:222)]))
str(wave1$perceived.stress)
## num [1:444] 1 11 9 9 5 5 12 4 10 1 ...
# num [1:444] 1 11 9 9 5 5 12 4 10 1 ...
head(wave1$perceived.stress)
## [1] 1 11 9 9 5 5
#[1] 1 11 9 9 5 5
#Wellbeing Q163 - Q176, columns 223 - 237
#NOTE: Q221 is a quality control item and is column number 230
wave1[, c(223:229, 231:237)][wave1[, c(223:229, 231:237)] == ""] <- "NA"
wave1[, c(223:229, 231:237)] <- sapply(wave1[, c(223:229, 231:237)], as.numeric, is.na=NA)
wave1$wellbeing<- rowSums(wave1[,c(223:229, 231:237)], na.rm = TRUE)*NA^!rowSums(!is.na(wave1[,c(223:229, 231:237)]))
str(wave1$wellbeing)
## num [1:444] 67 35 48 34 52 56 44 52 48 56 ...
# num [1:444] 67 35 48 34 52 56 44 52 48 56 ...
head(wave1$wellbeing)
## [1] 67 35 48 34 52 56
#[1] 67 35 48 34 52 56
#Sleep
#- Sleep Hygiene Q178 - Q188. (238:248)
wave1$Q178 <- recode(wave1$Q178, "1"="00:00", "2"="00:30", "3"="01:00", "4"="01:30", "5"="02:00",
"6"="02:30", "7"="03:00", "8"="03:30", "9"="04:00", "10"="04:30",
"11"="05:00", "12"="05:30", "13"="06:00", "14"="06:30", "15"="07:00",
"16"="07:30", "17"="08:00", "18"="08:30", "19"="09:00", "20"="09:30",
"21"="10:00", "22"="10:30", "23"="11:00", "24"="11:30", "25"="12:00",
"26"="12:30", "27"="13:00", "28"="13:30", "29"="14:00", "30"="14:30",
"31"="15:00", "32"="15:30", "33"="16:00", "34"="16:30", "35"="17:00",
"36"="17:30", "37"="18:00", "38"="18:30", "39"="19:00", "40"="19:30",
"41"="20:00", "42"="20:30", "43"="21:00", "44"="21:30", "45"="22:00",
"46"="22:30", "47"="23:00", "48"="23:30")
head(wave1$Q178)
## [1] "09:00" "08:30" "06:00" "09:30" "09:30" "08:30"
#[1] "09:00" "08:30" "06:00" "09:30" "09:30" "08:30"
wave1$Q179 <- recode(wave1$Q179, "1"="00:00", "2"="00:30", "3"="01:00", "4"="01:30", "5"="02:00",
"6"="02:30", "7"="03:00", "8"="03:30", "9"="04:00", "10"="04:30",
"11"="05:00", "12"="05:30", "13"="06:00", "14"="06:30", "15"="07:00",
"16"="07:30", "17"="08:00", "18"="08:30", "19"="09:00", "20"="09:30",
"21"="10:00", "22"="10:30", "23"="11:00", "24"="11:30", "25"="12:00",
"26"="12:30", "27"="13:00", "28"="13:30", "29"="14:00", "30"="14:30",
"31"="15:00", "32"="15:30", "33"="16:00", "34"="16:30", "35"="17:00",
"36"="17:30", "37"="18:00", "38"="18:30", "39"="19:00", "40"="19:30",
"41"="20:00", "42"="20:30", "43"="21:00", "44"="21:30", "45"="22:00",
"46"="22:30", "47"="23:00", "48"="23:30")
#Warning message:
#Unreplaced values treated as NA as `.x` is not compatible.
#Please specify replacements exhaustively or supply `.default`.
head(wave1$Q179)
## [1] "23:30" "23:30" "22:00" "03:00" "22:30" "23:30"
#[1] "23:30" "23:30" "22:00" "03:00" "22:30" "23:30"
wave1$Q180 <- recode(wave1$Q180, "1"="00:00", "2"="00:30", "3"="01:00", "4"="01:30", "5"="02:00",
"6"="02:30", "7"="03:00", "8"="03:30", "9"="04:00", "10"="04:30",
"11"="05:00", "12"="05:30", "13"="06:00", "14"="06:30", "15"="07:00",
"16"="07:30", "17"="08:00", "18"="08:30", "19"="09:00", "20"="09:30",
"21"="10:00", "22"="10:30", "23"="11:00", "24"="11:30", "25"="12:00",
"26"="12:30", "27"="13:00", "28"="13:30", "29"="14:00", "30"="14:30",
"31"="15:00", "32"="15:30", "33"="16:00", "34"="16:30", "35"="17:00",
"36"="17:30", "37"="18:00", "38"="18:30", "39"="19:00", "40"="19:30",
"41"="20:00", "42"="20:30", "43"="21:00", "44"="21:30", "45"="22:00",
"46"="22:30", "47"="23:00", "48"="23:30")
head(wave1$Q180)
## [1] "10:00" "09:30" "08:00" "14:00" "09:30" "10:00"
#[1] "10:00" "09:30" "08:00" "14:00" "09:30" "10:00"
wave1$Q181 <- recode(wave1$Q181, "1"="00:00", "2"="00:30", "3"="01:00", "4"="01:30", "5"="02:00",
"6"="02:30", "7"="03:00", "8"="03:30", "9"="04:00", "10"="04:30",
"11"="05:00", "12"="05:30", "13"="06:00", "14"="06:30", "15"="07:00",
"16"="07:30", "17"="08:00", "18"="08:30", "19"="09:00", "20"="09:30",
"21"="10:00", "22"="10:30", "23"="11:00", "24"="11:30", "25"="12:00",
"26"="12:30", "27"="13:00", "28"="13:30", "29"="14:00", "30"="14:30",
"31"="15:00", "32"="15:30", "33"="16:00", "34"="16:30", "35"="17:00",
"36"="17:30", "37"="18:00", "38"="18:30", "39"="19:00", "40"="19:30",
"41"="20:00", "42"="20:30", "43"="21:00", "44"="21:30", "45"="22:00",
"46"="22:30", "47"="23:00", "48"="23:30")
#Warning message:
#Unreplaced values treated as NA as `.x` is not compatible.
#Please specify replacements exhaustively or supply `.default`.
head(wave1$Q181)
## [1] "49" "00:00" "23:00" "04:00" "22:30" "01:00"
#[1] NA "00:00" "23:00" "04:00" "22:30" "01:00"
wave1$Q182 <- recode(wave1$Q182, "10"="10+")
#Warning message:
#Unreplaced values treated as NA as `.x` is not compatible.
#Please specify replacements exhaustively or supply `.default`.
head(wave1$Q182)
## [1] "0" "0" "0" "0" "2" "1"
#[1] "0" "0" "0" "0" "2" "1"
#- Sleep condition indicator Q189 - Q196; columns 249 - 256
wave1$Q189[wave1$Q189 == ""] <- "NA"
wave1$Q190[wave1$Q190 == ""] <- "NA"
wave1$Q191[wave1$Q191 == ""] <- "NA"
wave1$Q192[wave1$Q192 == ""] <- "NA"
wave1$Q193[wave1$Q193 == ""] <- "NA"
wave1$Q194[wave1$Q194 == ""] <- "NA"
wave1$Q195[wave1$Q195 == ""] <- "NA"
wave1$Q196[wave1$Q196 == ""] <- "NA"
wave1[, c(249:256)] <- sapply(wave1[, c(249:256)], as.numeric, is.na=NA)
wave1$SCI = rowSums(wave1[,c(249:256)], na.rm=TRUE)
wave1$SCI = rowSums(wave1[,c(249:256)], na.rm=TRUE)*NA^!rowSums(!is.na(wave1[,c(251:258)]))
head(wave1$SCI)
## [1] 31 6 19 18 11 29
#[1] 31 6 19 18 11 29
#sleep condition indicators cut-off - probable insomnia disorder = score of less than or equal to 16
wave1$insomnia.screening <- 'NA'
wave1$insomnia.screening[wave1$SCI==0] <- 'negative'
wave1$insomnia.screening[wave1$SCI > 0] <- 'negative'
wave1$insomnia.screening[wave1$SCI < 17] <- 'positive'
head(wave1$insomnia.screening)
## [1] "negative" "positive" "negative" "negative" "positive" "negative"
#[1] "negative" "positive" "negative" "negative" "positive" "negative"
#Perfectionism Q197 - Q204, columns 257-264
wave1[, c(257:264)] <- sapply(wave1[, c(257:264)], as.numeric, is.na=NA)
wave1$perfectionism = rowSums(wave1[,c(257:264)], na.rm=TRUE)*NA^!rowSums(!is.na(wave1[,c(257:264)]))
str(wave1$perfectionism)
## num [1:444] 23 20 40 31 33 17 33 28 30 40 ...
# num [1:444] 23 20 40 31 33 17 33 28 30 40 ...
head(wave1$perfectionism)
## [1] 23 20 40 31 33 17
#[1] 23 20 40 31 33 17
#custom items - Student Experience Questions
#subscale 1 = Academic - Q60, Q61, Q62 and Q63. Columns 81, 82, 83 and 85 (84 is a quality control item)
str(wave1$Q60)
## chr [1:444] "5" "4" "5" "2" "5" "4" "4" "5" "4" "5" "5" "5" "5" "5" "4" ...
#num [1:444] 5 4 5 2 5 4 4 5 4 5
wave1[, c(81:83, 85)] <- sapply(wave1[, c(81:83, 85)], as.numeric, is.na=NA)
wave1$SE.academic<- rowSums(wave1[,c(81:83, 85)], na.rm = TRUE)*NA^!rowSums(!is.na(wave1[,c(81:83, 85)]))
str(wave1$SE.academic)
## num [1:444] 19 10 19 14 16 17 15 17 14 17 ...
# num [1:444] 19 10 19 14 16 17 15 17 14 17 ...
head(wave1$SE.academic)
## [1] 19 10 19 14 16 17
#[1] 19 10 19 14 16 17
#subscale 2 = finances - Q80, Q81, Q82. Columns 109, 110, 112 (111 is a quality control item)
wave1[, c(109, 110, 112)] <- sapply(wave1[, c(109, 110, 112)], as.numeric, is.na=NA)
wave1$SE.finances<- rowSums(wave1[,c(109, 110, 112)], na.rm = TRUE)*NA^!rowSums(!is.na(wave1[,c(109, 110, 112)]))
str(wave1$SE.finances)
## num [1:444] 15 10 7 12 13 11 9 10 9 7 ...
#num [1:444] 15 10 7 12 13 11 9 10 9 7 ...
head(wave1$SE.finances)
## [1] 15 10 7 12 13 11
#[1] 15 10 7 12 13 11
#subscale 3 = accomodation - Q71, Q72, Q73, Q74. Columns 93:96
wave1[, c(93:96)] <- sapply(wave1[, c(93:96)], as.numeric, is.na=NA)
wave1$SE.accom<- rowSums(wave1[,c(93:96)], na.rm = TRUE)*NA^!rowSums(!is.na(wave1[,c(95:98)]))
str(wave1$SE.accom)
## num [1:444] 18 20 12 15 13 16 19 19 16 20 ...
#num [1:444] 18 20 12 15 13 16 19 19 16 20 ...
head(wave1$SE.accom)
## [1] 18 20 12 15 13 16
#[1] 18 20 12 15 13 16
#subscale 4 = friendship, Q42, Q43. Columns 58 & 59
wave1[, c(58, 59)] <- sapply(wave1[, c(58, 59)], as.numeric, is.na=NA)
wave1$SE.friends<- rowSums(wave1[,c(58, 59)], na.rm = TRUE)*NA^!rowSums(!is.na(wave1[,c(58, 59)]))
str(wave1$SE.friends)
## num [1:444] 8 5 5 4 4 7 6 6 4 10 ...
#num [1:444] 8 5 5 4 4 7 6 6 4 10 ...
head(wave1$SE.friends)
## [1] 8 5 5 4 4 7
#[1] 8 5 5 4 4 7
#subscale 5 = community, Q26 & Q44, columns 42 & 60
wave1[, c(42, 60)] <- sapply(wave1[, c(42, 60)], as.numeric, is.na=NA)
wave1$SE.community<- rowSums(wave1[,c(42, 60)], na.rm = TRUE)*NA^!rowSums(!is.na(wave1[,c(42, 60)]))
str(wave1$SE.community)
## num [1:444] 10 5 5 6 7 4 10 5 4 5 ...
#num [1:444] 10 5 5 6 7 4 10 5 4 5 ...
head(wave1$SE.community)
## [1] 10 5 5 6 7 4
#[1] 10 5 5 6 7 4
After exploring the data we decided that people who completed less than 10% of the survey (second pick in the data distribution) would be excluded from the study.
#completors and non-completors
str(wave1$Progress)
## chr [1:444] "100" "100" "100" "100" "100" "100" "100" "100" "100" "100" ...
# chr [1:444] "100" "100" "100" "100" "100" "100" "100" "100" "100" "100" "100" "100" "100" ...
wave1$Progress <- as.numeric(wave1$Progress)
hist(wave1$Progress)
describe(wave1$Progress)
# vars n mean sd median trimmed mad min max range skew kurtosis se
#X1 1 444 61.3 45.13 100 63.76 0 0 100 100 -0.37 -1.8 2.14
#coding completors and non-completors
wave1$Progress <- as.numeric(wave1$Progress)
wave1$cut.off <- 'pass'
wave1$cut.off[wave1$Progress < 10] <- 'fail'
head(wave1$cut.off)
## [1] "pass" "pass" "pass" "pass" "pass" "pass"
#[1] "pass" "pass" "pass" "pass" "pass" "pass"
table(wave1$cut.off)
##
## fail pass
## 144 300
#fail pass
# 144 300
pf <- as.data.frame(table(wave1$cut.off))
knitr::kable(pf)
| Var1 | Freq |
|---|---|
| fail | 144 |
| pass | 300 |
I created a new file called “pass” in which we filtered out participants who completed less than 10% of the questionnaire.
pass <- filter(wave1, cut.off == "pass")
I singled out participants’ scores on the four quality check items.
We decided to exclude participants who completed less than 3 out of 4 quality check items.
quality <- pass[, c(9,84,111,200,230)]
quality[, c(2:5)] <- sapply(quality[, c(2:5)], as.numeric, is.na=NA)
quality$tot <- rowSums(quality[2:5])
quality$exc <- ifelse(quality$tot == 28, "keep", "exclude")
table(quality$exc)
##
## exclude keep
## 50 189
#exclude keep
#50 189
quality$tot[is.na(quality$tot)]<- 1
quality$exc <- ifelse(quality$tot == 28, "keep", "exclude")
table(quality$exc)
##
## exclude keep
## 111 189
# exclude keep
# 111 189
quality$Q220[is.na(quality$Q220)]<- 0
quality$Q217[is.na(quality$Q217)]<- 0
quality$Q218[is.na(quality$Q218)]<- 0
quality$Q221[is.na(quality$Q221)]<- 0
table(quality$Q217) #35 NA; 8 within one; 20 completely wrong
##
## 0 9 10 11 12
## 35 20 3 237 5
table(quality$Q218) #44 NA; 24 within one; 2 completely wrong
##
## 0 8 9 11 12
## 44 1 1 24 230
table(quality$Q220) #56 NA; 1 within one;
##
## 0 1 2
## 56 1 243
table(quality$Q221) #60 NA; 2 within one;
##
## 0 3 4
## 60 238 2
table(quality$Q217,quality$Q218)
##
## 0 8 9 11 12
## 0 34 0 0 0 1
## 9 0 0 0 0 20
## 10 0 0 0 0 3
## 11 10 1 1 24 201
## 12 0 0 0 0 5
#### 0 8 9 11 12
#0 34 0 0 0 1
#9 0 0 0 0 20
#10 0 0 0 0 3
#11 10 1 1 24 201
#12 0 0 0 0 5
table(quality$Q217,quality$Q220)
##
## 0 1 2
## 0 34 0 1
## 9 2 0 18
## 10 0 0 3
## 11 20 0 217
## 12 0 1 4
### 0 1 2
#0 34 0 1
#9 2 0 18
#10 0 0 3
#11 20 0 217
#12 0 1 4
table(quality$Q217,quality$Q221)
##
## 0 3 4
## 0 34 1 0
## 9 2 18 0
## 10 0 3 0
## 11 24 211 2
## 12 0 5 0
### 0 3 4
#0 34 1 0
#9 2 18 0
#10 0 3 0
#11 24 211 2
#12 0 5 0
quality$Q217n <- ifelse(quality$Q217 == 11, 1, 0)
quality$Q218n <- ifelse(quality$Q218 == 12, 1, 0)
quality$Q220n <- ifelse(quality$Q220 == 2, 1, 0)
quality$Q221n <- ifelse(quality$Q221 == 3, 1, 0)
quality$totyn <- rowSums(quality[8:11])
qt <- data.frame(table(quality$totyn))
# 2+ = 252
# 3+ = 242
# 4 = 188
knitr::kable(qt)
| Var1 | Freq |
|---|---|
| 0 | 34 |
| 1 | 14 |
| 2 | 10 |
| 3 | 54 |
| 4 | 188 |
quality$Two_plus <- ifelse(quality$totyn>= 2, 1,0)
quality$Three_plus <- ifelse(quality$totyn>= 3, 1,0)
quality$Four <- ifelse(quality$totyn>= 4, 1,0)
table(quality$Two_plus)
##
## 0 1
## 48 252
table(quality$Three_plus)
##
## 0 1
## 58 242
table(quality$Four)
##
## 0 1
## 112 188
quality <- quality[,c(1,13:15)]
pass <- right_join(pass, quality)
## Joining with `by = join_by(ResponseId)`
pass <- filter(pass, Three_plus==1)
pass <- filter(pass, Three_plus==1)
I used the scales cut off to devide participants in clinical/non-clinical or high/low scores.
#Creating new divisions for scales without cut off and with cut off WORKS####
#Perfectionism
pass$perfectionism.screening <- 'NA'
pass$perfectionism.screening[pass$perfectionism >= 8] <- 'Low Perfectionism'
pass$perfectionism.screening[pass$perfectionism >= 16] <- 'Moderate Perfectionism'
pass$perfectionism.screening[pass$perfectionism >= 32] <- 'High Perfectionism'
table(pass$perfectionism.screening)
##
## High Perfectionism Low Perfectionism Moderate Perfectionism
## 81 6 149
## NA
## 6
# High Perfectionism Low Perfectionism Moderate Perfectionism NA
# 81 6 149 6
head(pass$perfectionism)
## [1] 23 20 40 31 33 17
#[1] 23 20 40 31 33 17
head(pass$perfectionism.screening)
## [1] "Moderate Perfectionism" "Moderate Perfectionism" "High Perfectionism"
## [4] "Moderate Perfectionism" "High Perfectionism" "Moderate Perfectionism"
#[1] "Moderate Perfectionism" "Moderate Perfectionism" "High Perfectionism" "Moderate Perfectionism"
#[5] "High Perfectionism" "Moderate Perfectionism"
#Social Anxiety (actual cut off)
head(pass$social.anxiety)
## [1] 2 5 7 7 10 2
#[1] 2 5 7 7 10 2
pass$socialanxiety.clin<- 'NA'
pass$socialanxiety.clin[pass$social.anxiety < 6] <- 'Non-clinical'
pass$socialanxiety.clin[pass$social.anxiety >= 6] <- 'Clinical'
head(pass$socialanxiety.clin)
## [1] "Non-clinical" "Non-clinical" "Clinical" "Clinical" "Clinical"
## [6] "Non-clinical"
#[1] "Non-clinical" "Non-clinical" "Clinical" "Clinical" "Clinical" "Non-clinical"
table(pass$socialanxiety.clin)
##
## Clinical Non-clinical
## 88 154
# Clinical Non-clinical
# 88 154
#CUTOFF
pass$procrastination.screening<-'NA'
pass$procrastination.screening[pass$procrastination >= 6]<-'Low Procrastination'
pass$procrastination.screening[pass$procrastination >= 18]<-'Moderate Procrastination'
pass$procrastination.screening[pass$procrastination >= 24]<-'High Procrastination'
table(pass$procrastination.screening)
##
## High Procrastination Low Procrastination Moderate Procrastination
## 48 108 85
## NA
## 1
# High Procrastination Low Procrastination Moderate Procrastination NA
# 48 108 85 1
#UCLA loneliness scale(pre and post uni start)(cut-off = 6)
pass$uni.loneliness.screening <-'NA'
pass$uni.loneliness.screening[pass$uni.loneliness>= 6]<-'Lonely'
pass$uni.loneliness.screening[pass$uni.loneliness<6]<-'Not Lonely'
table(pass$uni.loneliness.screening)
##
## Lonely Not Lonely
## 142 100
##
## Lonely Not Lonely
## 142 100
pass$pre.loneliness.screening <-'NA'
pass$pre.loneliness.screening[pass$pre.loneliness<6]<-'Not Lonely'
pass$pre.loneliness.screening[pass$pre.loneliness>= 6]<-'Lonely'
table(pass$pre.loneliness.screening)
##
## Lonely Not Lonely
## 131 111
##
## Lonely Not Lonely
## 131 111
#Self control
pass$self.control.screening <-'NA'
pass$self.control.screening[pass$self.control >=13]<-'Not Controlled'
pass$self.control.screening[pass$self.control >= 26]<-'Slightly Controlled'
pass$self.control.screening[pass$self.control >= 39]<-'Moderately Controlled'
pass$self.control.screening[pass$self.control >= 52]<-'Controlled'
table(pass$self.control.screening)
##
## Moderately Controlled Not Controlled Slightly Controlled
## 53 19 170
##
## Moderately Controlled Not Controlled Slightly Controlled
## 53 19 170
#Social anxiety
pass$social.anxiety.screening <-'NA'
pass$social.anxiety.screening [pass$social.anxiety <6]<-'Not Anxious'
pass$social.anxiety.screening [pass$social.anxiety >= 6]<-'Anxious'
table(pass$social.anxiety.screening)
##
## Anxious Not Anxious
## 88 154
prop.table(table(pass$social.anxiety.screening))
##
## Anxious Not Anxious
## 0.3636364 0.6363636
##
## Anxious Not Anxious
## 88 154
#AUDIT
table(pass$alcohol.screening)
##
## alcohol dependence alcohol use disorder negative
## 9 15 113
## problem drinking
## 105
#alcohol dependence alcohol use disorder negative problem drinking
#9 15 113 105
prop.table(table(pass$alcohol.screening))
##
## alcohol dependence alcohol use disorder negative
## 0.03719008 0.06198347 0.46694215
## problem drinking
## 0.43388430
#CUDIT
table(pass$cannabis.screening)
##
## cannabis use disorder hazardous NA
## 4 9 129
## negative
## 100
prop.table(table(pass$cannabis.screening))
##
## cannabis use disorder hazardous NA
## 0.01652893 0.03719008 0.53305785
## negative
## 0.41322314
#cannabis use disorder hazardous NA negative
# 4 9 129 100
#Perceived Stress
pass$perceived.stress.screening <-'NA'
pass$perceived.stress.screening[pass$perceived.stress >= 0]<-'Little to no perceived stress'
pass$perceived.stress.screening[pass$perceived.stress>= 4]<-'Slightly perceived stress'
pass$perceived.stress.screening[pass$perceived.stress>= 8]<-'moderate perceived stress'
pass$perceived.stress.screening[pass$perceived.stress>= 12]<-'Highly perceived stress'
table(pass$perceived.stress.screening)
##
## Highly perceived stress Little to no perceived stress
## 26 24
## moderate perceived stress NA
## 89 4
## Slightly perceived stress
## 99
# Highly perceived stress Little to no perceived stress moderate perceived stress
# 26 24 89
# NA Slightly perceived stress
# 4 99
#wellbeing
describe(pass$wellbeing)
pass$wellbeing.screening <- ifelse(pass$wellbeing>=35, "above", "below")
table(pass$wellbeing.screening)
##
## above below
## 213 25
#above below
# 213 25
prop.table(table(pass$wellbeing.screening))
##
## above below
## 0.894958 0.105042
#insomnia
table(pass$insomnia.screening)
##
## NA negative positive
## 6 179 57
prop.table(table(pass$insomnia.screening))
##
## NA negative positive
## 0.02479339 0.73966942 0.23553719
# NA negative positive
# 6 179 57
#Sleep Hygiene (higher scores = lower sleep hygiene)
pass[, c(244:249)] <- sapply(pass[, c(244:249)], as.numeric, is.na=NA)
pass$sleephygiene<- rowSums(pass[,c(244:249)], na.rm = TRUE)*NA^!rowSums(!is.na(pass[,c(244:249)]))
table(pass$sleephygiene)
##
## 3 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 21 22
## 1 7 8 4 20 34 26 25 27 24 23 15 13 3 2 2 1 1
# 3 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 21 22
# 1 7 8 4 20 34 26 25 27 24 23 15 13 3 2 2 1
test <- t.test(pass$uni.loneliness, pass$pre.loneliness, paired = TRUE, conf.level = 0.95)
# Paired t-test
#data: pass$uni.loneliness and pass$pre.loneliness
#t = 2.3338, df = 241, p-value = 0.02043
#alternative hypothesis: true mean difference is not equal to 0
#95 percent confidence interval:
# 0.04896928 0.57912990
#sample estimates:
# mean difference
# 0.3140496
effectsize::cohens_d(pass$uni.loneliness, pass$pre.loneliness, paired = TRUE)
#Cohen's d | 95% CI
#0.15 | [0.02, 0.28]
#People drinking and not drinking
pass$drinking <- "NA"
pass$drinking[pass$Q141 == 0] <- "Not drinking"
pass$drinking[pass$Q141 >= 1] <- "regular to problematic"
table(pass$drinking)
##
## Not drinking regular to problematic
## 41 201
# Not drinking regular to problematic
# 41 201
drinkingtable <- table(pass$drinking)
prop.table(drinkingtable)
##
## Not drinking regular to problematic
## 0.1694215 0.8305785
# Not drinking regular to problematic
## 0.1694215 0.8305785
#People consuming cannabis and not
pass$smoking <- "NA"
pass$smoking[pass$Q149 == 0] <- "Not smoking cannabis"
pass$smoking[pass$Q141 == 1] <- "regular to problematic"
table(pass$smoking)
##
## NA Not smoking cannabis regular to problematic
## 141 48 53
# NA Not smoking cannabis regular to problematic
# 141 48 53
prop.table(table(pass$smoking))
##
## NA Not smoking cannabis regular to problematic
## 0.5826446 0.1983471 0.2190083
##
## NA Not smoking cannabis regular to problematic
## 0.5826446 0.1983471 0.2190083
##recoding insomnia####
pass$Q189 <- dplyr::recode(pass$Q189,"0" = "4", "1" ="3", "2"="2", "3"="1", "4"="0")
pass$Q190 <- dplyr::recode(pass$Q190,"0" = "4", "1" ="3", "2"="2", "3"="1", "4"="0")
pass$Q191 <- dplyr::recode(pass$Q191,"0" = "4", "1" ="3", "2"="2", "3"="1", "4"="0")
pass$Q192 <- dplyr::recode(pass$Q192,"0" = "4", "1" ="3", "2"="2", "3"="1", "4"="0")
pass$Q193 <- dplyr::recode(pass$Q193,"0" = "4", "1" ="3", "2"="2", "3"="1", "4"="0")
pass$Q194 <- dplyr::recode(pass$Q194,"0" = "4", "1" ="3", "2"="2", "3"="1", "4"="0")
pass$Q195 <- dplyr::recode(pass$Q195,"0" = "4", "1" ="3", "2"="2", "3"="1", "4"="0")
pass$Q196 <- dplyr::recode(pass$Q196,"0" = "4", "1" ="3", "2"="2", "3"="1", "4"="0")
pass$Q189 <- as.numeric(pass$Q189)
pass$Q190 <- as.numeric(pass$Q190)
pass$Q191 <- as.numeric(pass$Q191)
pass$Q192 <- as.numeric(pass$Q192)
pass$Q193 <- as.numeric(pass$Q193)
pass$Q194 <- as.numeric(pass$Q194)
pass$Q195 <- as.numeric(pass$Q195)
pass$Q196 <- as.numeric(pass$Q196)
pass$SCIn <- rowSums(pass[,c(251:258)], na.rm = TRUE)*NA^!rowSums(!is.na(pass[,c(251:258)]))
hist(pass$SCIn)
PC <- as.data.frame(colnames(pass))
knitr::kable(PC)
| colnames(pass) |
|---|
| StartDate |
| EndDate |
| Status |
| IPAddress |
| Progress |
| Duration..in.seconds. |
| Finished |
| RecordedDate |
| ResponseId |
| RecipientLastName |
| RecipientFirstName |
| RecipientEmail |
| ExternalReference |
| LocationLatitude |
| LocationLongitude |
| DistributionChannel |
| UserLanguage |
| Q1 |
| Q2 |
| Q3 |
| Q4 |
| Q5 |
| Q8 |
| Q9 |
| Q11 |
| Q12 |
| Q13 |
| Q16 |
| Q16_4_TEXT |
| Q17 |
| Q18 |
| Q18_4_TEXT |
| Q19 |
| Q19_5_TEXT |
| Q20 |
| Q21 |
| Q22 |
| Q23 |
| Q23_5_TEXT |
| Q24 |
| Q25 |
| Q26 |
| Q27 |
| Q28 |
| Q29 |
| Q30 |
| Q31 |
| Q32 |
| Q33 |
| Q34 |
| Q35 |
| Q36 |
| Q37 |
| Q38 |
| Q39 |
| Q40 |
| Q41 |
| Q42 |
| Q43 |
| Q44 |
| Q45 |
| Q46 |
| Q47 |
| Q48 |
| Q49_1 |
| Q49_2 |
| Q50 |
| Q51 |
| Q53 |
| Q54_1 |
| Q54_2 |
| Q55 |
| Q55_0_TEXT |
| Q56_1 |
| Q56_2 |
| Q57 |
| Q58_1 |
| Q58_2 |
| Q59_1 |
| Q59_2 |
| Q60 |
| Q61 |
| Q62 |
| Q217 |
| Q63 |
| Q64 |
| Q65 |
| Q66 |
| Q67 |
| Q68 |
| Q69 |
| Q70 |
| Q71 |
| Q72 |
| Q73 |
| Q74 |
| Q75_1 |
| Q75_2 |
| Q75_3 |
| Q75_4 |
| Q75_5 |
| Q75_6 |
| Q75_7 |
| Q75_8 |
| Q76 |
| Q77 |
| Q78 |
| Q79 |
| Q80 |
| Q81 |
| Q218 |
| Q82 |
| Q83 |
| Q84 |
| Q85 |
| Q86 |
| Q87 |
| Q88 |
| Q89 |
| Q90 |
| Q91 |
| Q92 |
| Q93 |
| Q94 |
| Q95 |
| Q96 |
| Q97 |
| Q98 |
| Q99 |
| Q100 |
| Q101 |
| Q102 |
| Q103 |
| Q104 |
| Q105 |
| Q106 |
| Q107 |
| Q108 |
| Q109 |
| Q110 |
| Q111 |
| Q112 |
| Q113 |
| Q114 |
| Q115 |
| Q116 |
| Q117 |
| Q118 |
| Q119 |
| Q120 |
| Q121 |
| Q122 |
| Q123 |
| Q124 |
| Q125 |
| Q126 |
| Q127 |
| Q128 |
| Q129 |
| Q130 |
| Q131 |
| Q131_4_TEXT |
| Q132_1 |
| Q132_2 |
| Q132_3 |
| Q132_4 |
| Q132_5 |
| Q132_6 |
| Q132_7 |
| Q133_1 |
| Q133_2 |
| Q133_3 |
| Q133_4 |
| Q133_5 |
| Q133_6 |
| Q133_7 |
| Q133_8 |
| Q133_9 |
| Q136 |
| Q137 |
| Q138 |
| Q140_1 |
| Q140_2 |
| Q140_3 |
| Q140_4 |
| Q140_5 |
| Q140_6 |
| Q140_7 |
| Q140_8 |
| Q140_9 |
| Q140_10 |
| Q140_11 |
| Q140_12 |
| Q140_13 |
| Q140_14 |
| Q141 |
| Q142 |
| Q143 |
| Q144 |
| Q220 |
| Q145 |
| Q146 |
| Q148 |
| Q149 |
| Q150 |
| Q151 |
| Q152 |
| Q153 |
| Q154 |
| Q155 |
| Q156 |
| Q157_1 |
| Q157_2 |
| Q157_3 |
| Q157_4 |
| Q157_5 |
| Q157_6 |
| Q157_7 |
| Q159 |
| Q160 |
| Q161 |
| Q162 |
| Q163 |
| Q164 |
| Q165 |
| Q166 |
| Q167 |
| Q168 |
| Q169 |
| Q221 |
| Q170 |
| Q171 |
| Q172 |
| Q173 |
| Q174 |
| Q175 |
| Q176 |
| Q178 |
| Q179 |
| Q180 |
| Q181 |
| Q182 |
| Q183 |
| Q184 |
| Q185 |
| Q186 |
| Q187 |
| Q188 |
| Q189 |
| Q190 |
| Q191 |
| Q192 |
| Q193 |
| Q194 |
| Q195 |
| Q196 |
| Q197 |
| Q198 |
| Q199 |
| Q200 |
| Q201 |
| Q202 |
| Q203 |
| Q204 |
| Q207 |
| Q209 |
| Q212 |
| Q214 |
| Q216 |
| KCL |
| age18 |
| UGPG |
| year |
| faculty |
| gender |
| transgender |
| orientation |
| ethnicity |
| student.status |
| age |
| disability |
| LD |
| accomodation |
| hm_KCL |
| hm_students |
| hm_friends |
| hm_family |
| hm_partner |
| hm_alone |
| hm_other |
| commute |
| employed |
| diag_depression |
| diag_mania |
| diag_GAD |
| diag_socialanx |
| diag_agoraphobia |
| diag_panic |
| diag_OCD |
| diag_anorexia |
| diag_bulimia |
| diag_binge |
| diag_schizophrenia |
| diag_psychosis |
| diag_PD |
| diag_autism |
| diag_ADHD |
| past.diagnosis |
| tx_medication |
| tx_therapy |
| tx_admission |
| tx_other |
| tx_none |
| placement |
| relocation |
| pre.loneliness |
| uni.loneliness |
| Q48B |
| relationship.status |
| relationship.months |
| v.mins |
| ipaq.v |
| m.mins |
| ipaq.m |
| w.mins |
| ipaq.walk |
| ipaq.sit |
| procrastination |
| GAD |
| GADseverity |
| GADclinical |
| PHQ |
| PHQseverity |
| PHQclinical |
| social.anxiety |
| self.control |
| AUDIT |
| alcohol.screening |
| CUDIT |
| cannabis.screening |
| perceived.stress |
| wellbeing |
| SCI |
| insomnia.screening |
| perfectionism |
| SE.academic |
| SE.finances |
| SE.accom |
| SE.friends |
| SE.community |
| cut.off |
| Two_plus |
| Three_plus |
| Four |
| perfectionism.screening |
| socialanxiety.clin |
| procrastination.screening |
| uni.loneliness.screening |
| pre.loneliness.screening |
| self.control.screening |
| social.anxiety.screening |
| perceived.stress.screening |
| wellbeing.screening |
| sleephygiene |
| drinking |
| smoking |
| SCIn |
We decided to divide the demographics by grouping different minorities together.
Percentages of KCL demographics were provided by PowerBI.
# demographics Graph ####
describe(as.numeric(pass$age))
pass$disability[pass$disability== "disability"] <- "Disability"
pass$disability[pass$disability== "no disability"] <- "No Disability"
pass$disability[pass$disability== "prefer not to say"] <- "Unknown"
Table.disability <- as.data.frame(round(prop.table(table(pass$disability))*100,1))
pass$gender[pass$gender=="other"|pass$gender=="non-binary"] <- "Gender Minority"
pass$gender[pass$gender=="male"] <- "Men"
pass$gender[pass$gender=="female"] <- "Women"
Table.gender <- as.data.frame(round(prop.table(table(pass$gender))*100,1))
pass$nethnicity[pass$ethnicity=="Black"|
pass$ethnicity=="Asian"|pass$ethnicity=="Mixed"|
pass$ethnicity=="Other"] <- "Ethnic Minority"
pass$nethnicity[pass$ethnicity=="White"] <- "White"
pass$nethnicity[pass$ethnicity=="prefer not to say"] <- "Unknown"
Table.ethnicity <- as.data.frame(round(prop.table(table(pass$nethnicity))*100,1))
pass$orientation[pass$orientation== "heterosexual"] <- "Heterosexual"
pass$orientation[pass$orientation== "prefer not to say"] <- "Unknown"
pass$orientation[pass$orientation== "gay/lesbian"|pass$orientation== "mostly straight"|pass$orientation== "bisexual"|pass$orientation== "other"] <- "Sexual Minority"
Table.sexualorientation <- as.data.frame(round(prop.table(table(pass$orientation))*100,1))
pass$year[pass$year=="1"] <- "Year 1"
pass$year[pass$year=="2"] <- "Year 2"
pass$year[pass$year=="3"] <- "Year 3"
pass$year[pass$year=="4"| pass$year == "5"] <- "Year 4+"
Table.year <- as.data.frame(round(prop.table(table(pass$year))*100,1))
pass$UGPG[pass$UGPG=="UG"] <- "Undergraduate"
pass$UGPG[pass$UGPG=="PG"] <- "Postgraduate"
Table.UGPG <- as.data.frame(round(prop.table(table(pass$UGPG))*100,1))
pass$transgender[pass$transgender=="transgender"] <- "Transgender"
pass$transgender[pass$transgender=="cisgender"] <- "Cisgender"
Table.transgender <- as.data.frame(round(prop.table(table(pass$transgender))*100,1))
pass$student.status[pass$student.status=="home"] <- "Home"
pass$student.status[pass$student.status=="overseas"] <- "Overseas"
Table.studentstatus <- as.data.frame(round(prop.table(table(pass$student.status))*100,1))
colnames(Table.transgender)[1]<- "Sex"
colnames(Table.sexualorientation)[1]<- "Sexual Orientation"
colnames(Table.disability)[1] <- "Disability"
colnames(Table.year)[1] <- "Year"
colnames(Table.gender)[1] <- "Gender"
colnames(Table.ethnicity)[1] <- "Ethnicity"
colnames(Table.UGPG)[1] <- "Course Level"
colnames(Table.studentstatus)[1] <- "Student Status"
colnames(Table.transgender)[2]<- "%"
colnames(Table.sexualorientation)[2]<- "%"
colnames(Table.disability)[2] <- "%"
colnames(Table.year)[2] <- "%"
colnames(Table.gender)[2] <- "%"
colnames(Table.ethnicity)[2] <- "%"
colnames(Table.UGPG)[2] <- "%"
colnames(Table.studentstatus)[2] <- "%"
Table.transgender$Source <- "Uni-WiSE"
Table.sexualorientation$Source <- "Uni-WiSE"
Table.disability$Source <- "Uni-WiSE"
Table.year$Source <- "Uni-WiSE"
Table.gender$Source <- "Uni-WiSE"
Table.ethnicity$Source <- "Uni-WiSE"
Table.UGPG$Source <- "Uni-WiSE"
Table.studentstatus$Source <- "Uni-WiSE"
Kings.transgender <- data.frame(Sex = c("Transgender", "Cisgender"),
P = c(1.4, 98.6),
Source= c("KCL","KCL")
)
Kings.UGPG <- data.frame(Course = c("Undergraduate", "Postgraduate"),
P = c(61.7, 38.3),
Source= c("KCL","KCL")
)
Kings.year <- data.frame(Year = c("Year 1", "Year 2","Year 3","Year 4+"),
P = c(52.2, 21.1,18.6,8.1),
Source= c("KCL","KCL","KCL","KCL")
)
Kings.sexualorientation <- data.frame(`Sexual Orientation` = c("Heterosexual", "Sexual Minority","Unknown"),
P = c(84, 7,9),
Source= c("KCL","KCL","KCL")
)
Kings.gender <- data.frame(Gender = c("Men", "Women","Gender Minority"),
P = c(63, 37,1),
Source= c("KCL","KCL","KCL")
)
Kings.studentstatus <- data.frame(StudentStatus = c("Home", "EU","Overseas"),
P = c(61.3, 19.9,18.8),
Source= c("KCL","KCL","KCL")
)
Kings.ethnicity <- data.frame(Ethnicity = c("White", "Ethnic Minority", "Unknown"),
P = c(57, 41, 2),
Source= c("KCL","KCL","KCL")
)
Kings.disability <- data.frame(Disability = c("No Disability", "Disability", "Unknown"),
P = c(88.4,11.6, 0),
Source= c("KCL","KCL","KCL")
)
colnames(Kings.sexualorientation)[1]<- "Sexual Orientation"
colnames(Kings.studentstatus)[1]<- "Student Status"
colnames(Kings.UGPG)[1] <- "Course Level"
colnames(Kings.transgender)[2]<- "%"
colnames(Kings.sexualorientation)[2]<- "%"
colnames(Kings.disability)[2] <- "%"
colnames(Kings.year)[2] <- "%"
colnames(Kings.gender)[2] <- "%"
colnames(Kings.ethnicity)[2] <- "%"
colnames(Kings.UGPG)[2] <- "%"
colnames(Kings.studentstatus)[2] <- "%"
transgender <- rbind(Table.transgender,Kings.transgender)
ethnicity <- rbind(Table.ethnicity,Kings.ethnicity)
gender<- rbind(Table.gender,Kings.gender)
sexualorientation <- rbind(Table.sexualorientation,Kings.sexualorientation)
studentstatus<- rbind(Table.studentstatus,Kings.studentstatus)
disability <- rbind(Table.disability,Kings.disability)
UGPG<- rbind(Table.UGPG,Kings.UGPG)
year <- rbind(Table.year,Kings.year)
transgender$Sex <- factor(transgender$Sex, levels = c("Cisgender", "Transgender"))
UGPG$`Course Level` <- factor(UGPG$`Course Level`, levels = c("Undergraduate", "Postgraduate"))
studentstatus$`Student Status` <- factor(studentstatus$`Student Status`, levels = c("Overseas", "EU","Home"))
knitr::kable(transgender, "pipe")
| Sex | % | Source |
|---|---|---|
| Cisgender | 98.8 | Uni-WiSE |
| Transgender | 1.2 | Uni-WiSE |
| Transgender | 1.4 | KCL |
| Cisgender | 98.6 | KCL |
knitr::kable(ethnicity, "pipe")
| Ethnicity | % | Source |
|---|---|---|
| Ethnic Minority | 38.4 | Uni-WiSE |
| Unknown | 0.8 | Uni-WiSE |
| White | 60.7 | Uni-WiSE |
| White | 57.0 | KCL |
| Ethnic Minority | 41.0 | KCL |
| Unknown | 2.0 | KCL |
knitr::kable(gender, "pipe")
| Gender | % | Source |
|---|---|---|
| Gender Minority | 2.1 | Uni-WiSE |
| Men | 11.6 | Uni-WiSE |
| Women | 86.4 | Uni-WiSE |
| Men | 63.0 | KCL |
| Women | 37.0 | KCL |
| Gender Minority | 1.0 | KCL |
knitr::kable(sexualorientation, "pipe")
| Sexual Orientation | % | Source |
|---|---|---|
| Heterosexual | 70.7 | Uni-WiSE |
| Sexual Minority | 25.9 | Uni-WiSE |
| Unknown | 3.3 | Uni-WiSE |
| Heterosexual | 84.0 | KCL |
| Sexual Minority | 7.0 | KCL |
| Unknown | 9.0 | KCL |
knitr::kable(studentstatus, "pipe")
| Student Status | % | Source |
|---|---|---|
| EU | 21.5 | Uni-WiSE |
| Home | 51.2 | Uni-WiSE |
| Overseas | 27.3 | Uni-WiSE |
| Home | 61.3 | KCL |
| EU | 19.9 | KCL |
| Overseas | 18.8 | KCL |
knitr::kable(disability, "pipe")
| Disability | % | Source |
|---|---|---|
| Disability | 15.7 | Uni-WiSE |
| No Disability | 79.3 | Uni-WiSE |
| Unknown | 5.0 | Uni-WiSE |
| No Disability | 88.4 | KCL |
| Disability | 11.6 | KCL |
| Unknown | 0.0 | KCL |
knitr::kable(UGPG, "pipe")
| Course Level | % | Source |
|---|---|---|
| Postgraduate | 35.1 | Uni-WiSE |
| Undergraduate | 64.9 | Uni-WiSE |
| Undergraduate | 61.7 | KCL |
| Postgraduate | 38.3 | KCL |
knitr::kable(year, "pipe")
| Year | % | Source |
|---|---|---|
| Year 1 | 59.5 | Uni-WiSE |
| Year 2 | 15.7 | Uni-WiSE |
| Year 3 | 16.1 | Uni-WiSE |
| Year 4+ | 8.7 | Uni-WiSE |
| Year 1 | 52.2 | KCL |
| Year 2 | 21.1 | KCL |
| Year 3 | 18.6 | KCL |
| Year 4+ | 8.1 | KCL |
##Colour####
cared <- "#AD0505"
cbblue <- "#005AB5"
cbyellow <- "#FFEC5A"
cbazz <- "#648FFF"
mycols<- c(cared,cbblue,cbyellow,cbazz)
cvi_colours = list(
cvi_purples = c("#381532", "#4b1b42", "#5d2252", "#702963",
"#833074", "#953784", "#a83e95"),
mycols= c("#AD0505", "#005AB5", "#FFEC5A", "#648FFF"))
Chloe_palette = function(name, n, all_palettes = cvi_colours, type = c("discrete", "continuous")) {
palette = all_palettes[[name]]
if (missing(n)) {
n = length(palette)
}
type = match.arg(type)
out = switch(type,
continuous = grDevices::colorRampPalette(palette)(n),
discrete = palette[1:n]
)
structure(out, name = name, class = "palette")
}
a2<- studentstatus%>%
ggplot(aes(x=Source, y=`%`, fill = `Student Status`)) +
geom_bar(stat="identity", colour = "black", width = 0.5, position = "stack")+
theme_classic()+ scale_fill_manual(values=Chloe_palette("mycols", type="discrete"))+
theme(axis.line.y.left=element_line(colour ="white"),axis.title.y = element_blank(),
axis.title.x = element_text(face = "bold", colour = "black") ,
axis.text = element_text(face="bold", colour="black"),
axis.line.x.bottom=element_line(colour="white"),
axis.text.y = element_text(angle = 90, vjust = 0.5, hjust=0.6),
axis.ticks = element_blank(),axis.text.x=element_blank(),legend.title=element_blank(),
legend.key.size = unit(0.5, 'cm'),legend.key.height = unit(0.5, 'cm'),
legend.key.width = unit(0.5, 'cm'), legend.text = element_text(size=10),
legend.position = "bottom", legend.direction = "horizontal")+
coord_flip()
b2<- UGPG%>%
ggplot(aes(x=Source, y=`%`, fill = `Course Level`)) +
geom_bar(stat="identity", colour = 'black', width = 0.5, position = "stack")+
theme_classic()+ scale_fill_manual(values=Chloe_palette("mycols", type="discrete"))+
theme(axis.line.y.left=element_line(colour ="white"),axis.title.y = element_blank(),
axis.title.x = element_text(face = "bold", colour = "black") ,
axis.text = element_text(face="bold", colour="black"),
axis.line.x.bottom=element_line(colour="white"),
axis.text.y = element_text(angle = 90, vjust = 0.5, hjust=0.6),
axis.ticks = element_blank(),axis.text.x=element_blank(),legend.title=element_blank(),
legend.key.size = unit(0.5, 'cm'),legend.key.height = unit(0.5, 'cm'),
legend.key.width = unit(0.5, 'cm'), legend.text = element_text(size=10),
legend.position = "bottom", legend.direction = "horizontal")+
coord_flip()
c2<- disability%>%
ggplot( aes(x=Source, y=`%`, fill = Disability)) +
geom_bar(stat="identity", colour = 'black', width = 0.5, position = "stack")+
theme_classic()+ scale_fill_manual(values=Chloe_palette("mycols", type="discrete"))+
theme(axis.line.y.left=element_line(colour ="white"),axis.title.y = element_blank(),
axis.title.x = element_text(face = "bold", colour = "black") ,
axis.text = element_text(face="bold", colour="black"),
axis.line.x.bottom=element_line(colour="white"),
axis.text.y = element_text(angle = 90, vjust = 0.5, hjust=0.6),
axis.ticks = element_blank(),axis.text.x=element_blank(),legend.title=element_blank(),
legend.key.size = unit(0.5, 'cm'),legend.key.height = unit(0.5, 'cm'),
legend.key.width = unit(0.5, 'cm'), legend.text = element_text(size=10),
legend.position = "bottom", legend.direction = "horizontal")+
coord_flip()
d2<- transgender%>%
ggplot(aes(x=Source, y=`%`, fill = Sex)) +
geom_bar(stat="identity", colour = 'black', width = 0.5, position = "stack")+
theme_classic()+ scale_fill_manual(values=Chloe_palette("mycols", type="discrete"))+
theme(axis.line.y.left=element_line(colour ="white"),axis.title.y = element_blank(),
axis.title.x = element_text(face = "bold", colour = "black") ,
axis.text = element_text(face="bold", colour="black"),
axis.line.x.bottom=element_line(colour="white"),
axis.text.y = element_text(angle = 90, vjust = 0.5, hjust=0.6),
axis.ticks = element_blank(),axis.text.x=element_blank(),legend.title=element_blank(),
legend.key.size = unit(0.5, 'cm'),legend.key.height = unit(0.5, 'cm'),
legend.key.width = unit(0.5, 'cm'), legend.text = element_text(size=10),
legend.position = "bottom", legend.direction = "horizontal")+
coord_flip()
e2<- sexualorientation%>%
ggplot(aes(x=Source, y=`%`, fill = `Sexual Orientation`)) +
geom_bar(stat="identity", colour = 'black', width = 0.5, position = "stack")+
theme_classic()+ scale_fill_manual(values=Chloe_palette("mycols", type="discrete"))+
theme(axis.line.y.left=element_line(colour ="white"),axis.title.y = element_blank(),
axis.title.x = element_text(face = "bold", colour = "black") ,
axis.text = element_text(face="bold", colour="black"),
axis.line.x.bottom=element_line(colour="white"),
axis.text.y = element_text(angle = 90, vjust = 0.5, hjust=0.6),
axis.ticks = element_blank(),axis.text.x=element_blank(),legend.title=element_blank(),
legend.key.size = unit(0.5, 'cm'),legend.key.height = unit(0.5, 'cm'),
legend.key.width = unit(0.5, 'cm'), legend.text = element_text(size=10),
legend.position = "bottom", legend.direction = "horizontal")+
coord_flip()
f2<- ethnicity%>%
ggplot(aes(x=Source, y=`%`, fill = Ethnicity)) +
geom_bar(stat="identity", colour = 'black', width = 0.5, position = "stack")+
theme_classic()+ scale_fill_manual(values=Chloe_palette("mycols", type="discrete"))+
theme(axis.line.y.left=element_line(colour ="white"),axis.title.y = element_blank(),
axis.title.x = element_text(face = "bold", colour = "black") ,
axis.text = element_text(face="bold", colour="black"),
axis.line.x.bottom=element_line(colour="white"),
axis.text.y = element_text(angle = 90, vjust = 0.5, hjust=0.6),
axis.ticks = element_blank(),axis.text.x=element_blank(),legend.title=element_blank(),
legend.key.size = unit(0.5, 'cm'),legend.key.height = unit(0.5, 'cm'),
legend.key.width = unit(0.5, 'cm'), legend.text = element_text(size=10),
legend.position = "bottom", legend.direction = "horizontal")+
coord_flip()
g2<- gender%>%
ggplot(aes(x=Source, y=`%`, fill = Gender)) +
geom_bar(stat="identity", colour = 'black', width = 0.5, position = "stack")+
theme_classic()+ scale_fill_manual(values=Chloe_palette("mycols", type="discrete"))+
theme(axis.line.y.left=element_line(colour ="white"),axis.title.y = element_blank(),
axis.title.x = element_text(face = "bold", colour = "black") ,
axis.text = element_text(face="bold", colour="black"),
axis.line.x.bottom=element_line(colour="white"),
axis.text.y = element_text(angle = 90, vjust = 0.5, hjust=0.6),
axis.ticks = element_blank(),axis.text.x=element_blank(),legend.title=element_blank(),
legend.key.size = unit(0.5, 'cm'),legend.key.height = unit(0.5, 'cm'),
legend.key.width = unit(0.5, 'cm'), legend.text = element_text(size=10),
legend.position = "bottom", legend.direction = "horizontal")+
coord_flip()
h2<- year%>%
ggplot(aes(x=Source, y=`%`, fill = Year)) +
geom_bar(stat="identity", colour = 'black', width = 0.5, position = "stack")+
theme_classic()+ scale_fill_manual(values=Chloe_palette("mycols", type="discrete"))+
theme(axis.line.y.left=element_line(colour ="white"),axis.title.y = element_blank(),
axis.title.x = element_text(face = "bold", colour = "black") ,
axis.text = element_text(face="bold", colour="black"),
axis.line.x.bottom=element_line(colour="white"),
axis.text.y = element_text(angle = 90, vjust = 0.5, hjust=0.6),
axis.ticks = element_blank(),axis.text.x=element_blank(),legend.title=element_blank(),
legend.key.size = unit(0.5, 'cm'),legend.key.height = unit(0.5, 'cm'),
legend.key.width = unit(0.5, 'cm'), legend.text = element_text(size=10),
legend.position = "bottom", legend.direction = "horizontal")+
coord_flip()
ggpubr::ggarrange(a2,b2,c2,d2,e2,f2,g2,h2)
Figure 1. Demographics of Uni-WiSE and KCL
#Creating table 1: Diagnoses Reported by participants
To look at how many participants reported a diagnosis, I created separate tables showing the number and percentages of participants divided by diagnosed and undiagnosed. The tables were merged by their common column
#Table 1 (Diagnosis) ####
Depression <- as.data.frame(table(pass$diag_depression))
Depression2<- as.data.frame(round(prop.table(table(pass$diag_depression)),3)*100)
colnames(Depression2) <- c("Var1", "%")
Depression$diagnosis <- c("Depression")
Depression <- right_join(Depression, Depression2)
## Joining with `by = join_by(Var1)`
Depression <- Depression[,c(3,2,4,1)]
Mania<- as.data.frame(table(pass$diag_mania))
Mania2<- as.data.frame(round(prop.table(table(pass$diag_mania)),3)*100)
colnames(Mania2) <- c("Var1", "%")
Mania$diagnosis <- c("Mania")
Mania <- right_join(Mania, Mania2)
## Joining with `by = join_by(Var1)`
Mania <- Mania[,c(3,2,4,1)]
Anxiety <- as.data.frame(table(pass$diag_GAD))
Anxiety2<- as.data.frame(round(prop.table(table(pass$diag_GAD)),3)*100)
colnames(Anxiety2) <- c("Var1", "%")
Anxiety$diagnosis <- c("Anxiety")
Anxiety <- right_join(Anxiety, Anxiety2)
## Joining with `by = join_by(Var1)`
Anxiety <- Anxiety[,c(3,2,4,1)]
socialanx <- as.data.frame(table(pass$diag_socialanx))
socialanx2 <- as.data.frame(round(prop.table(table(pass$diag_socialanx)),3)*100)
colnames(socialanx2) <- c("Var1", "%")
socialanx$diagnosis <- c("Social Anxiety")
socialanx <- right_join(socialanx, socialanx2)
## Joining with `by = join_by(Var1)`
socialanx <- socialanx[,c(3,2,4,1)]
Agoraphobia <- as.data.frame(table(pass$diag_agoraphobia))
Agoraphobia2<- as.data.frame(round(prop.table(table(pass$diag_agoraphobia)),3)*100)
colnames(Agoraphobia2) <- c("Var1", "%")
Agoraphobia$diagnosis <- c("Agoraphobia")
Agoraphobia <- right_join(Agoraphobia, Agoraphobia2)
## Joining with `by = join_by(Var1)`
Agoraphobia <- Agoraphobia[,c(3,2,4,1)]
PanicAttacks <- as.data.frame(table(pass$diag_panic))
PanicAttacks2<- as.data.frame(round(prop.table(table(pass$diag_panic)),3)*100)
colnames(PanicAttacks2) <- c("Var1", "%")
PanicAttacks$diagnosis <- c("Panic Attacks")
PanicAttacks <- right_join(PanicAttacks, PanicAttacks2)
## Joining with `by = join_by(Var1)`
PanicAttacks <- PanicAttacks[,c(3,2,4,1)]
OCD <- as.data.frame(table(pass$diag_OCD))
OCD2<- as.data.frame(round(prop.table(table(pass$diag_OCD)),3)*100)
colnames(OCD2) <- c("Var1", "%")
OCD$diagnosis <- c("Obsessive Compulsive Disorder")
OCD <- right_join(OCD, OCD2)
## Joining with `by = join_by(Var1)`
OCD <- OCD[,c(3,2,4,1)]
Anorexia<- as.data.frame(table(pass$diag_anorexia))
Anorexia2<- as.data.frame(round(prop.table(table(pass$diag_anorexia)),3)*100)
colnames(Anorexia2) <- c("Var1", "%")
Anorexia$diagnosis <- c("Anorexia")
Anorexia <- right_join(Anorexia, Anorexia2)
## Joining with `by = join_by(Var1)`
Anorexia <- Anorexia[,c(3,2,4,1)]
Bulimia<- as.data.frame(table(pass$diag_bulimia))
Bulimia2<- as.data.frame(round(prop.table(table(pass$diag_bulimia)),3)*100)
colnames(Bulimia2) <- c("Var1", "%")
Bulimia$diagnosis <- c("Bulimia")
Bulimia <- right_join(Bulimia, Bulimia2)
## Joining with `by = join_by(Var1)`
Bulimia <- Bulimia[,c(3,2,4,1)]
BingeEating<- as.data.frame(table(pass$diag_binge))
BingeEating2<- as.data.frame(round(prop.table(table(pass$diag_binge)),3)*100)
colnames(BingeEating2) <- c("Var1", "%")
BingeEating$diagnosis <- c("Binge Eating")
BingeEating <- right_join(BingeEating, BingeEating2)
## Joining with `by = join_by(Var1)`
BingeEating <- BingeEating[,c(3,2,4,1)]
Schizophrenia<- as.data.frame(table(pass$diag_schizophrenia))
Schizophrenia2<- as.data.frame(round(prop.table(table(pass$diag_schizophrenia)),3)*100)
colnames(Schizophrenia2) <- c("Var1", "%")
Schizophrenia$diagnosis <- c("Schizophrenia")
Schizophrenia <- right_join(Schizophrenia, Schizophrenia2)
## Joining with `by = join_by(Var1)`
Schizophrenia <- Schizophrenia[,c(3,2,4,1)]
Psychosis<- as.data.frame(table(pass$diag_psychosis))
Psychosis2<- as.data.frame(round(prop.table(table(pass$diag_psychosis)),3)*100)
colnames(Psychosis2) <- c("Var1", "%")
Psychosis$diagnosis <- c("Psychosis")
Psychosis <- right_join(Psychosis, Psychosis2)
## Joining with `by = join_by(Var1)`
Psychosis <- Psychosis[,c(3,2,4,1)]
PersonalityDisorder<- as.data.frame(table(pass$diag_psychosis))
PersonalityDisorder2<- as.data.frame(round(prop.table(table(pass$diag_psychosis)),3)*100)
colnames(PersonalityDisorder2) <- c("Var1", "%")
PersonalityDisorder$diagnosis <- c("Personality Disorder")
PersonalityDisorder <- right_join(PersonalityDisorder, PersonalityDisorder2)
## Joining with `by = join_by(Var1)`
PersonalityDisorder <- PersonalityDisorder[,c(3,2,4,1)]
ASD<- as.data.frame(table(pass$diag_autism))
ASD2<- as.data.frame(round(prop.table(table(pass$diag_autism)),3)*100)
colnames(ASD2) <- c("Var1", "%")
ASD$diagnosis <- c("Autsim Spectrum Disorder")
ASD<- right_join(ASD, ASD2)
## Joining with `by = join_by(Var1)`
ASD <- ASD[,c(3,2,4,1)]
ADHD<- as.data.frame(table(pass$diag_ADHD))
ADHD2<- as.data.frame(round(prop.table(table(pass$diag_ADHD)),3)*100)
colnames(ADHD2) <- c("Var1", "%")
ADHD$diagnosis <- c("Attentiobn Deficit Hyperactivity Disorder")
ADHD<- right_join(ADHD, ADHD2)
## Joining with `by = join_by(Var1)`
ADHD <- ADHD[,c(3,2,4,1)]
MH <- pass[,c(293:313)]
MH[, c(1:15)] <- sapply(MH[, c(1:15)], as.numeric, is.na=NA)
MH$total_disorders = rowSums(MH[,c(1:15)], na.rm=TRUE)*NA^!rowSums(!is.na(MH[,c(1:15)]))
MH$multiple_disorders <- ifelse(MH$total_disorders>1, "More than one", "one")
table(MH$multiple_disorders)
##
## More than one one
## 87 155
MH <- filter(MH, MH$total_disorders > 0)
dim(MH)
## [1] 105 23
table1 <- rbind(Depression, Mania, Anxiety, socialanx, Agoraphobia, PanicAttacks, OCD, Anorexia,
Bulimia, BingeEating, Schizophrenia, Psychosis, PersonalityDisorder, ASD, ADHD)
knitr::kable(table1, "pipe", caption = "Table 1: Reported Diagnosis")
| diagnosis | Freq | % | Var1 |
|---|---|---|---|
| Depression | 161 | 66.5 | FALSE |
| Depression | 81 | 33.5 | TRUE |
| Mania | 232 | 95.9 | FALSE |
| Mania | 10 | 4.1 | TRUE |
| Anxiety | 165 | 68.2 | FALSE |
| Anxiety | 77 | 31.8 | TRUE |
| Social Anxiety | 214 | 88.4 | FALSE |
| Social Anxiety | 28 | 11.6 | TRUE |
| Agoraphobia | 235 | 97.1 | FALSE |
| Agoraphobia | 7 | 2.9 | TRUE |
| Panic Attacks | 202 | 83.5 | FALSE |
| Panic Attacks | 40 | 16.5 | TRUE |
| Obsessive Compulsive Disorder | 231 | 95.5 | FALSE |
| Obsessive Compulsive Disorder | 11 | 4.5 | TRUE |
| Anorexia | 228 | 94.2 | FALSE |
| Anorexia | 14 | 5.8 | TRUE |
| Bulimia | 234 | 96.7 | FALSE |
| Bulimia | 8 | 3.3 | TRUE |
| Binge Eating | 230 | 95.0 | FALSE |
| Binge Eating | 12 | 5.0 | TRUE |
| Schizophrenia | 242 | 100.0 | FALSE |
| Psychosis | 238 | 98.3 | FALSE |
| Psychosis | 4 | 1.7 | TRUE |
| Personality Disorder | 238 | 98.3 | FALSE |
| Personality Disorder | 4 | 1.7 | TRUE |
| Autsim Spectrum Disorder | 238 | 98.3 | FALSE |
| Autsim Spectrum Disorder | 4 | 1.7 | TRUE |
| Attentiobn Deficit Hyperactivity Disorder | 235 | 97.1 | FALSE |
| Attentiobn Deficit Hyperactivity Disorder | 7 | 2.9 | TRUE |
I saved the descriptive statistics for each scale and then selected the variables I n eeded the most. I then merged them all together.
#Table 2 (scales descriptives)####
GAD <- as.data.frame(psych::describe(pass$GAD))
GAD <- GAD[,c(1:4, 8:9, 13)]
GAD$vars[GAD$vars==1] <- "GAD"
PHQ <- as.data.frame(psych::describe(pass$PHQ))
PHQ<- PHQ[,c(1:4, 8:9, 13)]
PHQ$vars[PHQ$vars==1] <- "PHQ"
AUDIT <- as.data.frame(psych::describe(pass$AUDIT))
AUDIT <- AUDIT[,c(1:4, 8:9, 13)]
AUDIT$vars[AUDIT$vars==1] <- "AUDIT"
CUDIT <- as.data.frame(psych::describe(pass$CUDIT))
CUDIT<- CUDIT[,c(1:4, 8:9, 13)]
CUDIT$vars[CUDIT$vars==1] <- "CUDIT"
soc_anx <- as.data.frame(psych::describe(pass$social.anxiety))
soc_anx <- soc_anx[,c(1:4, 8:9, 13)]
soc_anx$vars[soc_anx$vars==1] <- "Social Anxiety"
SCI <- as.data.frame(psych::describe(pass$SCIn))
SCI <- SCI[,c(1:4, 8:9, 13)]
SCI$vars[SCI$vars==1] <- "Sleep Condition Indicator"
blank2 <- data.frame(c("UCLA Loneliness Scale"),
c(""),
c(""),
c(""),
c(""),
c(""),
c(""))
colnames(blank2) <- c("vars","n", "mean", "sd", "min", "max", "se")
pre_loneliness <- as.data.frame(psych::describe(pass$pre.loneliness))
pre_loneliness <- pre_loneliness[,c(1:4, 8:9, 13)]
pre_loneliness$vars[pre_loneliness$vars==1] <- "Pre-University"
uni_loneliness <- as.data.frame(psych::describe(pass$uni.loneliness))
uni_loneliness <- uni_loneliness[,c(1:4, 8:9, 13)]
uni_loneliness$vars[uni_loneliness$vars==1] <- "Post-University"
blank1 <- data.frame(c("Psychological Phenotypes"),
c(""),
c(""),
c(""),
c(""),
c(""),
c(""))
colnames(blank1) <- c("vars","n", "mean", "sd", "min", "max", "se")
wellbeing <- as.data.frame(psych::describe(pass$wellbeing))
wellbeing <- wellbeing[,c(1:4, 8:9, 13)]
wellbeing$vars[wellbeing$vars==1] <- "Warwick-Edinburgh Mental
Wellbeing Scale"
SC <- as.data.frame(psych::describe(pass$self.control))
SC <- SC[,c(1:4, 8:9, 13)]
SC$vars[SC$vars==1] <- "Brief Self-Control Scale"
perfectionism <- as.data.frame(psych::describe(pass$perfectionism))
perfectionism <- perfectionism[,c(1:4, 8:9, 13)]
perfectionism$vars[perfectionism$vars==1] <- "Brief Frost-Multidimensional Perfectionism Scale"
perceived_stress <- as.data.frame(psych::describe(pass$perceived.stress))
perceived_stress <- perceived_stress[,c(1:4, 8:9, 13)]
perceived_stress$vars[perceived_stress$vars==1] <- "Brief Perceived Stress Scale"
procrastination <- as.data.frame(psych::describe(pass$procrastination))
procrastination <- procrastination[,c(1:4, 8:9, 13)]
procrastination$vars[procrastination$vars==1] <- "Procrastination Scale"
SHL <- as.data.frame(psych::describe(pass$sleephygiene))
SHL <- SHL[,c(1:4, 8:9, 13)]
SHL$vars[SHL$vars==1] <- "Sleep Hygiene"
Table2 <- rbind(GAD,PHQ, AUDIT, CUDIT,soc_anx, SCI, SC, blank1, wellbeing, perfectionism,
blank2, pre_loneliness, uni_loneliness, perceived_stress, procrastination,
SHL)
knitr::kable(Table2, "pipe", caption = "Table 2: Descriptive Statistics per Scale")
| vars | n | mean | sd | min | max | se | |
|---|---|---|---|---|---|---|---|
| X1 | GAD | 242 | 7.53719008264463 | 5.62381026210287 | 0 | 21 | 0.361512215676313 |
| X11 | PHQ | 242 | 8.9504132231405 | 6.4978148126052 | 0 | 27 | 0.417695356080685 |
| X12 | AUDIT | 242 | 3.16528925619835 | 2.87599048768912 | 0 | 18 | 0.184875670588453 |
| X13 | CUDIT | 113 | 2.69026548672566 | 3.79397936119494 | 0 | 19 | 0.356907555929275 |
| X14 | Social Anxiety | 242 | 4.61570247933884 | 3.39835225546043 | 0 | 12 | 0.218454356790606 |
| X15 | Sleep Condition Indicator | 236 | 16.2161016949153 | 6.74394253450925 | 4 | 34 | 0.438993267142508 |
| X16 | Brief Self-Control Scale | 242 | 33.7066115702479 | 5.63192199141429 | 18 | 46 | 0.362033657385699 |
| 1 | Psychological Phenotypes | ||||||
| X17 | Warwick-Edinburgh Mental | ||||||
| Wellbeing Scale | 238 | 45.7478991596639 | 9.36977678959508 | 18 | 70 | 0.607352420386818 | |
| X18 | Brief Frost-Multidimensional Perfectionism Scale | 236 | 28.2203389830508 | 6.30182086920758 | 12 | 40 | 0.410213598079182 |
| 11 | UCLA Loneliness Scale | ||||||
| X19 | Pre-University | 242 | 5.58264462809917 | 1.93552410417284 | 3 | 9 | 0.124420201746421 |
| X110 | Post-University | 242 | 5.89669421487603 | 1.88729905953783 | 3 | 9 | 0.121320178466017 |
| X111 | Brief Perceived Stress Scale | 238 | 7.47899159663866 | 3.1950614304318 | 0 | 15 | 0.20710507161838 |
| X112 | Procrastination Scale | 241 | 18.2489626556017 | 5.74132034780325 | 6 | 30 | 0.369830954632738 |
| X113 | Sleep Hygiene | 236 | 11.3305084745763 | 3.15973358625345 | 3 | 22 | 0.205681137291935 |
#Table 3 ####
table(pass$diag_GAD, pass$diag_depression)
##
## FALSE TRUE
## FALSE 143 22
## TRUE 18 59
pass$DIAG <- ifelse(pass$diag_depression =="TRUE"|pass$diag_GAD =="TRUE", "Diagnosed","Not Diagnosed")
pass$DIAG[pass$diag_depression=="TRUE"&pass$diag_GAD=="FALSE"]<- "Depression"
pass$DIAG[pass$diag_depression=="FALSE"&pass$diag_GAD=="TRUE"]<- "Anxiety"
pass$DIAG[pass$diag_depression=="TRUE"&pass$diag_GAD=="TRUE"]<- "Both"
pass$CLIN <- ifelse(pass$GADclinical =="clinical"|pass$PHQclinical =="clinical", "Clinical","Non-Clinical")
pass$CLIN[pass$PHQclinical =="clinical"&pass$GADclinical =="non-clinical"]<- "Clinical Depression"
pass$CLIN[pass$GADclinical =="clinical"&pass$PHQclinical =="non-clinical"]<- "Clinical Anxiety"
pass$CLIN[pass$GADclinical =="clinical"&pass$PHQclinical =="clinical"]<- "Both Thresholds met"
table3 <-as.data.frame(table(pass$CLIN, pass$DIAG))
round(prop.table(table(pass$CLIN, pass$DIAG)), 3)*100
##
## Anxiety Both Depression Not Diagnosed
## Both Thresholds met 2.9 12.8 3.7 10.3
## Clinical Anxiety 1.2 2.9 0.4 7.9
## Clinical Depression 0.0 2.5 0.8 4.1
## Non-Clinical 3.3 6.2 4.1 36.8
knitr::kable(table3, "pipe", caption = "Table 3: Crosstable Diagnosis x Results of our Scales")
| Var1 | Var2 | Freq |
|---|---|---|
| Both Thresholds met | Anxiety | 7 |
| Clinical Anxiety | Anxiety | 3 |
| Clinical Depression | Anxiety | 0 |
| Non-Clinical | Anxiety | 8 |
| Both Thresholds met | Both | 31 |
| Clinical Anxiety | Both | 7 |
| Clinical Depression | Both | 6 |
| Non-Clinical | Both | 15 |
| Both Thresholds met | Depression | 9 |
| Clinical Anxiety | Depression | 1 |
| Clinical Depression | Depression | 2 |
| Non-Clinical | Depression | 10 |
| Both Thresholds met | Not Diagnosed | 25 |
| Clinical Anxiety | Not Diagnosed | 19 |
| Clinical Depression | Not Diagnosed | 10 |
| Non-Clinical | Not Diagnosed | 89 |
Same procedure as diagnosis
# supplementary table Therapy ####
mh <- pass[,c(116:162, 293:313)]
mh[, c(64:67)] <- sapply(mh[, c(64:67)], as.numeric, is.na=NA)
mh$total_medications <- rowSums(mh[,c(64:67)], na.rm=TRUE)*NA^!rowSums(!is.na(mh[,c(64:67)]))
mh$total_medications_f <- ifelse(mh$past.diagnosis=="TRUE", mh$total_medications, 0)
hist(mh$total_medications_f)
table(mh$total_medications_f)
##
## 0 1 2 3 4
## 143 30 56 12 1
prop.table(table(mh$total_medications_f))
##
## 0 1 2 3 4
## 0.590909091 0.123966942 0.231404959 0.049586777 0.004132231
table(mh$past.diagnosis)
##
## FALSE TRUE
## 137 105
medication1 <- as.data.frame(table(mh$tx_medication))
medication1$Var1<- ifelse(medication1$Var1==0,"No Medication", "Medication")
medication1$treatment <- "medication"
medication_p <- as.data.frame(round(prop.table(table(mh$tx_medication)),3)*100)
medication_p$Var1<- ifelse(medication_p$Var1==0,"No Medication", "Medication")
colnames(medication_p)<- c("Var1", "%")
medication <- right_join(medication1,medication_p)
## Joining with `by = join_by(Var1)`
medication<- medication[,c(3,1,2,4)]
therapy1 <- as.data.frame(table(mh$tx_therapy))
therapy1$Var1<- ifelse(therapy1$Var1==0,"No Therapy", "Therapy")
therapy1$treatment <- "Therapy"
therapy_p <- as.data.frame(round(prop.table(table(mh$tx_therapy)),3)*100)
therapy_p$Var1<- ifelse(therapy_p$Var1==0,"No Therapy", "Therapy")
colnames(therapy_p)<- c("Var1", "%")
therapy <- right_join(therapy1,therapy_p)
## Joining with `by = join_by(Var1)`
therapy <- therapy[,c(3,1,2,4)]
admission1 <- as.data.frame(table(mh$tx_admission))
admission1$Var1<- ifelse(admission1$Var1==0,"No Admission", "Admission")
admission1$treatment <- "Admission"
admission_p <- as.data.frame(round(prop.table(table(mh$tx_admission)),3)*100)
admission_p$Var1<- ifelse(admission_p$Var1==0,"No Admission", "Admission")
colnames(admission_p)<- c("Var1", "%")
admission <- right_join(admission1,admission_p)
## Joining with `by = join_by(Var1)`
admission <- admission[,c(3,1,2,4)]
other1 <- as.data.frame(table(mh$tx_other))
other1$Var1<- ifelse(other1$Var1==0,"No Other", "Other")
other1$treatment <- "Other"
other_p <- as.data.frame(round(prop.table(table(mh$tx_other)),3)*100)
other_p$Var1<- ifelse(other_p$Var1==0, "No Other", "Other")
colnames(other_p)<- c("Var1", "%")
other <- right_join(other1, other_p)
## Joining with `by = join_by(Var1)`
other <- other[,c(3,1,2,4)]
none1 <- as.data.frame(table(mh$tx_none))
none1$Var1<- ifelse(none1$Var1==FALSE,"Undetermined", "None")
none1$treatment <- "None"
none_p <- as.data.frame(round(prop.table(table(mh$tx_none)),3)*100)
none_p$Var1<- ifelse(none_p$Var1==FALSE,"Undetermined", "None")
colnames(none_p)<- c("Var1", "%")
none <- right_join(none1, none_p)
## Joining with `by = join_by(Var1)`
none <- none[,c(3,1,2,4)]
Supplementary_table1 <- rbind(medication, therapy, admission, other, none)
table(mh$total_medications>0)
##
## FALSE TRUE
## 119 123
table(mh$total_medications>1)
##
## FALSE TRUE
## 171 71
prop.table(table(mh$total_medications>1))
##
## FALSE TRUE
## 0.7066116 0.2933884
table(pass$Q131_4_TEXT)
##
## Admission to an NHS psychiatric inpatient unit
## 1
## Coaching
## 1
## Group CBT
## 1
## Neurofeedback Therapy
## 1
## Online CBT course
## 1
## Spiritual healing
## 1
knitr::kable(Supplementary_table1, "pipe", caption = "Supplementary Table 1: Therapy and Medication")
| treatment | Var1 | Freq | % |
|---|---|---|---|
| medication | No Medication | 174 | 71.9 |
| medication | Medication | 68 | 28.1 |
| Therapy | No Therapy | 129 | 53.3 |
| Therapy | Therapy | 113 | 46.7 |
| Admission | No Admission | 222 | 91.7 |
| Admission | Admission | 20 | 8.3 |
| Other | No Other | 235 | 97.1 |
| Other | Other | 7 | 2.9 |
| None | Undetermined | 127 | 52.5 |
| None | None | 115 | 47.5 |
#Supplementary table Age and time of onset #####
#Depression
mh$Q86 <- ifelse(mh$Q86 >=21, "21+", mh$Q86)
mh$Q86 <- ifelse(mh$Q86 <=15, "Below 15", mh$Q86)
depression_c <- as.data.frame(table(mh$Q86))
depression_c$condition <- "Depression"
depression_d <- as.data.frame(round(prop.table(table(mh$Q86)),3)*100)
colnames(depression_d)<- c("Var1", "%")
depression_age <- right_join(depression_c, depression_d)
## Joining with `by = join_by(Var1)`
depression_age <- depression_age[,c(3,1,2,4)]
depression_e <- as.data.frame(table(mh$Q87))
depression_e$condition <- "Depression"
depression_f <- as.data.frame(round(prop.table(table(mh$Q87)),3)*100)
colnames(depression_f)<- c("Var1", "%")
depression_time <- right_join(depression_e, depression_f)
## Joining with `by = join_by(Var1)`
depression_time <- depression_time[,c(3,1,2,4)]
depression_g <- as.data.frame(table(mh$Q88))
depression_g$condition <- "Depression"
depression_h <- as.data.frame(round(prop.table(table(mh$Q88)),3)*100)
colnames(depression_h)<- c("Var1", "%")
depression_prognosis <- right_join(depression_g, depression_h)
## Joining with `by = join_by(Var1)`
depression_prognosis <- depression_prognosis[,c(3,1,2,4)]
#Mania
mh$Q89 <- ifelse(mh$Q89 >=21, "21+", mh$Q89)
mh$Q89 <- ifelse(mh$Q89 <=15, "Below 15", mh$Q89)
mania_c <- as.data.frame(table(mh$Q89))
mania_c$condition <- "Mania"
mania_d <- as.data.frame(round(prop.table(table(mh$Q89)),3)*100)
colnames(mania_d)<- c("Var1", "%")
mania_age <- right_join(mania_c, mania_d)
## Joining with `by = join_by(Var1)`
mania_age <- mania_age[,c(3,1,2,4)]
mania_e <- as.data.frame(table(mh$Q90))
mania_e$condition <- "Mania"
mania_f <- as.data.frame(round(prop.table(table(mh$Q90)),3)*100)
colnames(mania_f)<- c("Var1", "%")
mania_time <- right_join(mania_e, mania_f)
## Joining with `by = join_by(Var1)`
mania_time <- mania_time[,c(3,1,2,4)]
mania_g <- as.data.frame(table(mh$Q91))
mania_g$condition <- "Mania"
mania_h <- as.data.frame(round(prop.table(table(mh$Q91)),3)*100)
colnames(mania_h)<- c("Var1", "%")
mania_prognosis <- right_join(mania_g, mania_h)
## Joining with `by = join_by(Var1)`
mania_prognosis <- mania_prognosis[,c(3,1,2,4)]
#Anxiety
mh$Q92 <- ifelse(mh$Q92 >=21, "21+", mh$Q92)
mh$Q92 <- ifelse(mh$Q92 <=15, "Below 15", mh$Q92)
anxiety_c <- as.data.frame(table(mh$Q92))
anxiety_c$condition <- "Anxiety"
anxiety_d <- as.data.frame(round(prop.table(table(mh$Q92)),3)*100)
colnames(anxiety_d)<- c("Var1", "%")
anxiety_age <- right_join(anxiety_c, anxiety_d)
## Joining with `by = join_by(Var1)`
anxiety_age <- anxiety_age[,c(3,1,2,4)]
anxiety_e <- as.data.frame(table(mh$Q93))
anxiety_e$condition <- "Anxiety"
anxiety_f <- as.data.frame(round(prop.table(table(mh$Q93)),3)*100)
colnames(anxiety_f)<- c("Var1", "%")
anxiety_time <- right_join(anxiety_e, anxiety_f)
## Joining with `by = join_by(Var1)`
anxiety_time <- anxiety_time[,c(3,1,2,4)]
anxiety_g <- as.data.frame(table(mh$Q94))
anxiety_g$condition <- "Anxiety"
anxiety_h <- as.data.frame(round(prop.table(table(mh$Q94)),3)*100)
colnames(anxiety_h)<- c("Var1", "%")
anxiety_prognosis <- right_join(anxiety_g, anxiety_h)
## Joining with `by = join_by(Var1)`
anxiety_prognosis <- anxiety_prognosis[,c(3,1,2,4)]
#Social Anxiety
mh$Q95 <- ifelse(mh$Q95 >=21, "21+", mh$Q95)
mh$Q95 <- ifelse(mh$Q95 <=15, "Below 15", mh$Q95)
socialanxiety_c <- as.data.frame(table(mh$Q95))
socialanxiety_c$condition <- "Social Anxiety"
socialanxiety_d <- as.data.frame(round(prop.table(table(mh$Q95)),3)*100)
colnames(socialanxiety_d)<- c("Var1", "%")
socialanxiety_age <- right_join(socialanxiety_c, socialanxiety_d)
## Joining with `by = join_by(Var1)`
socialanxiety_age <- socialanxiety_age[,c(3,1,2,4)]
socialanxiety_e <- as.data.frame(table(mh$Q96))
socialanxiety_e$condition <- "Social Anxiety"
socialanxiety_f <- as.data.frame(round(prop.table(table(mh$Q96)),3)*100)
colnames(socialanxiety_f)<- c("Var1", "%")
socialanxiety_time <- right_join(socialanxiety_e, socialanxiety_f)
## Joining with `by = join_by(Var1)`
socialanxiety_time <- socialanxiety_time[,c(3,1,2,4)]
socialanxiety_g <- as.data.frame(table(mh$Q97))
socialanxiety_g$condition <- "Social Anxiety"
socialanxiety_h <- as.data.frame(round(prop.table(table(mh$Q97)),3)*100)
colnames(socialanxiety_h)<- c("Var1", "%")
socialanxiety_prognosis <- right_join(socialanxiety_g, socialanxiety_h)
## Joining with `by = join_by(Var1)`
socialanxiety_prognosis <- socialanxiety_prognosis[,c(3,1,2,4)]
#Agoraphobia (no reports)
#mh$Q98 <- ifelse(mh$Q98 >=21, "21+", mh$Q98)
#mh$Q98 <- ifelse(mh$Q98 <=15, "Below 15", mh$Q98)
#agoraphobia_c <- as.data.frame(table(mh$Q98))
#agoraphobia_c$condition <- "Agoraphobia"
#agoraphobia_d <- as.data.frame(round(prop.table(table(mh$Q98)),3)*100)
#colnames(agoraphobia_d)<- c("Var1", "%")
#agoraphobia_age <- right_join(agoraphobia_c, agoraphobia_d)
#agoraphobia_age <- agoraphobia_age[,c(3,1,2,4)]
#agoraphobia_e <- as.data.frame(table(mh$Q99))
#agoraphobia_e$condition <- "Agoraphobia"
#agoraphobia_f <- as.data.frame(round(prop.table(table(mh$Q99)),3)*100)
#colnames(agoraphobia_f)<- c("Var1", "%")
#agoraphobia_time <- right_join(agoraphobia_e, agoraphobia_f)
#agoraphobia_time <- agoraphobia_time[,c(3,1,2,4)]
#agoraphobia_g <- as.data.frame(table(mh$Q100))
#agoraphobia_g$condition <- "Agoraphobia"
#agoraphobia_h <- as.data.frame(round(prop.table(table(mh$Q100)),3)*100)
#colnames(agoraphobia_h)<- c("Var1", "%")
#agoraphobia_prognosis <- right_join(agoraphobia_g, agoraphobia_h)
#agoraphobia_prognosis <- agoraphobia_prognosis[,c(3,1,2,4)]
#Panic Attack
mh$Q101 <- ifelse(mh$Q101 >=21, "21+", mh$Q101)
mh$Q101 <- ifelse(mh$Q101 <=15, "Below 15", mh$Q101)
panicattacks_c <- as.data.frame(table(mh$Q101))
panicattacks_c$condition <- "Panic Attack Disorder"
panicattacks_d <- as.data.frame(round(prop.table(table(mh$Q101)),3)*100)
colnames(panicattacks_d)<- c("Var1", "%")
panicattacks_age <- right_join(panicattacks_c, panicattacks_d)
## Joining with `by = join_by(Var1)`
panicattacks_age <- panicattacks_age[,c(3,1,2,4)]
panicattacks_e <- as.data.frame(table(mh$Q102))
panicattacks_e$condition <- "Panic Attack Disorder"
panicattacks_f <- as.data.frame(round(prop.table(table(mh$Q102)),3)*100)
colnames(panicattacks_f)<- c("Var1", "%")
panicattacks_time <- right_join(panicattacks_e, panicattacks_f)
## Joining with `by = join_by(Var1)`
panicattacks_time <- panicattacks_time[,c(3,1,2,4)]
panicattacks_g <- as.data.frame(table(mh$Q103))
panicattacks_g$condition <- "Panic Attack Disorder"
panicattacks_h <- as.data.frame(round(prop.table(table(mh$Q103)),3)*100)
colnames(panicattacks_h)<- c("Var1", "%")
panicattacks_prognosis <- right_join(panicattacks_g, panicattacks_h)
## Joining with `by = join_by(Var1)`
panicattacks_prognosis <- panicattacks_prognosis[,c(3,1,2,4)]
#OCD
mh$Q104 <- ifelse(mh$Q104 >=21, "21+", mh$Q104)
mh$Q104 <- ifelse(mh$Q104 <=15, "Below 15", mh$Q104)
OCD_c <- as.data.frame(table(mh$Q104))
OCD_c$condition <- "OCD"
OCD_d <- as.data.frame(round(prop.table(table(mh$Q104)),3)*100)
colnames(OCD_d)<- c("Var1", "%")
OCD_age <- right_join(OCD_c, OCD_d)
## Joining with `by = join_by(Var1)`
OCD_age <- OCD_age[,c(3,1,2,4)]
OCD_e <- as.data.frame(table(mh$Q105))
OCD_e$condition <- "OCD"
OCD_f <- as.data.frame(round(prop.table(table(mh$Q105)),3)*100)
colnames(OCD_f)<- c("Var1", "%")
OCD_time <- right_join(OCD_e, OCD_f)
## Joining with `by = join_by(Var1)`
OCD_time <- OCD_time[,c(3,1,2,4)]
OCD_g <- as.data.frame(table(mh$Q106))
OCD_g$condition <- "OCD"
OCD_h <- as.data.frame(round(prop.table(table(mh$Q106)),3)*100)
colnames(OCD_h)<- c("Var1", "%")
OCD_prognosis <- right_join(OCD_g, OCD_h)
## Joining with `by = join_by(Var1)`
OCD_prognosis <- OCD_prognosis[,c(3,1,2,4)]
#Anorexia
mh$Q107 <- ifelse(mh$Q107 >=21, "21+", mh$Q107)
mh$Q107 <- ifelse(mh$Q107 <=15, "Below 15", mh$Q107)
anorexia_c <- as.data.frame(table(mh$Q107))
anorexia_c$condition <- "Anorexia"
anorexia_d <- as.data.frame(round(prop.table(table(mh$Q107)),3)*100)
colnames(anorexia_d)<- c("Var1", "%")
anorexia_age <- right_join(anorexia_c, anorexia_d)
## Joining with `by = join_by(Var1)`
anorexia_age <- anorexia_age[,c(3,1,2,4)]
anorexia_e <- as.data.frame(table(mh$Q108))
anorexia_e$condition <- "Anorexia"
anorexia_f <- as.data.frame(round(prop.table(table(mh$Q108)),3)*100)
colnames(anorexia_f)<- c("Var1", "%")
anorexia_time <- right_join(anorexia_e, anorexia_f)
## Joining with `by = join_by(Var1)`
anorexia_time <- anorexia_time[,c(3,1,2,4)]
anorexia_g <- as.data.frame(table(mh$Q109))
anorexia_g$condition <- "Anorexia"
anorexia_h <- as.data.frame(round(prop.table(table(mh$Q109)),3)*100)
colnames(anorexia_h)<- c("Var1", "%")
anorexia_prognosis <- right_join(anorexia_g, anorexia_h)
## Joining with `by = join_by(Var1)`
anorexia_prognosis <- anorexia_prognosis[,c(3,1,2,4)]
#Bulimia
mh$Q110 <- ifelse(mh$Q110 >=21, "21+", mh$Q110)
mh$Q110 <- ifelse(mh$Q110 <=15, "Below 15", mh$Q110)
bulimia_c <- as.data.frame(table(mh$Q110))
bulimia_c$condition <- "Bulimia"
bulimia_d <- as.data.frame(round(prop.table(table(mh$Q110)),3)*100)
colnames(bulimia_d)<- c("Var1", "%")
bulimia_age <- right_join(bulimia_c, bulimia_d)
## Joining with `by = join_by(Var1)`
bulimia_age <- bulimia_age[,c(3,1,2,4)]
bulimia_e <- as.data.frame(table(mh$Q111))
bulimia_e$condition <- "Bulimia"
bulimia_f <- as.data.frame(round(prop.table(table(mh$Q111)),3)*100)
colnames(bulimia_f)<- c("Var1", "%")
bulimia_time <- right_join(bulimia_e, bulimia_f)
## Joining with `by = join_by(Var1)`
bulimia_time <- bulimia_time[,c(3,1,2,4)]
bulimia_g <- as.data.frame(table(mh$Q112))
bulimia_g$condition <- "Bulimia"
bulimia_h <- as.data.frame(round(prop.table(table(mh$Q112)),3)*100)
colnames(bulimia_h)<- c("Var1", "%")
bulimia_prognosis <- right_join(bulimia_g, bulimia_h)
## Joining with `by = join_by(Var1)`
bulimia_prognosis <- bulimia_prognosis[,c(3,1,2,4)]
#Binge Eating
mh$Q113 <- ifelse(mh$Q113 >=21, "21+", mh$Q113)
mh$Q113 <- ifelse(mh$Q113 <=15, "Below 15", mh$Q113)
bingeeating_c <- as.data.frame(table(mh$Q113))
bingeeating_c$condition <- "Binge Eating"
bingeeating_d <- as.data.frame(round(prop.table(table(mh$Q113)),3)*100)
colnames(bingeeating_d)<- c("Var1", "%")
bingeeating_age <- right_join(bingeeating_c, bingeeating_d)
## Joining with `by = join_by(Var1)`
bingeeating_age <- bingeeating_age[,c(3,1,2,4)]
bingeeating_e <- as.data.frame(table(mh$Q114))
bingeeating_e$condition <- "Binge Eating"
bingeeating_f <- as.data.frame(round(prop.table(table(mh$Q114)),3)*100)
colnames(bingeeating_f)<- c("Var1", "%")
bingeeating_time <- right_join(bingeeating_e, bingeeating_f)
## Joining with `by = join_by(Var1)`
bingeeating_time <- bingeeating_time[,c(3,1,2,4)]
bingeeating_g <- as.data.frame(table(mh$Q115))
bingeeating_g$condition <- "Binge Eating"
bingeeating_h <- as.data.frame(round(prop.table(table(mh$Q115)),3)*100)
colnames(bingeeating_h)<- c("Var1", "%")
bingeeating_prognosis <- right_join(bingeeating_g, bingeeating_h)
## Joining with `by = join_by(Var1)`
bingeeating_prognosis <- bingeeating_prognosis[,c(3,1,2,4)]
#schizophrenia
table(mh$Q116)
## < table of extent 0 >
#< table of extent 0 >
table(mh$Q117)
## < table of extent 0 >
#< table of extent 0 >
table(mh$Q118)
## < table of extent 0 >
#< table of extent 0 >
#psychosis
mh$Q119 <- ifelse(mh$Q113 >=21, "21+", mh$Q119)
mh$Q119 <- ifelse(mh$Q113 <=15, "Below 15", mh$Q119)
psychosis_c <- as.data.frame(table(mh$Q119))
psychosis_c$condition <- "Psychosis"
psychosis_d <- as.data.frame(round(prop.table(table(mh$Q119)),3)*100)
colnames(psychosis_d)<- c("Var1", "%")
psychosis_age <- right_join(psychosis_c, psychosis_d)
## Joining with `by = join_by(Var1)`
psychosis_age <- psychosis_age[,c(3,1,2,4)]
psychosis_e <- as.data.frame(table(mh$Q120))
psychosis_e$condition <- "Psychosis"
psychosis_f <- as.data.frame(round(prop.table(table(mh$Q120)),3)*100)
colnames(psychosis_f)<- c("Var1", "%")
psychosis_time <- right_join(psychosis_e, psychosis_f)
## Joining with `by = join_by(Var1)`
psychosis_time <- psychosis_time[,c(3,1,2,4)]
psychosis_g <- as.data.frame(table(mh$Q121))
psychosis_g$condition <- "Psychosis"
psychosis_h <- as.data.frame(round(prop.table(table(mh$Q121)),3)*100)
colnames(psychosis_h)<- c("Var1", "%")
psychosis_prognosis <- right_join(psychosis_g, psychosis_h)
## Joining with `by = join_by(Var1)`
psychosis_prognosis <- psychosis_prognosis[,c(3,1,2,4)]
#Personality Disorder
mh$Q122 <- ifelse(mh$Q113 >=21, "21+", mh$Q122)
mh$Q122 <- ifelse(mh$Q113 <=15, "Below 15", mh$Q122)
personalitydisorder_c <- as.data.frame(table(mh$Q122))
personalitydisorder_c$condition <- "Personality Disorder"
personalitydisorder_d <- as.data.frame(round(prop.table(table(mh$Q122)),3)*100)
colnames(personalitydisorder_d)<- c("Var1", "%")
personalitydisorder_age <- right_join(personalitydisorder_c, personalitydisorder_d)
## Joining with `by = join_by(Var1)`
personalitydisorder_age <- personalitydisorder_age[,c(3,1,2,4)]
personalitydisorder_e <- as.data.frame(table(mh$Q123))
personalitydisorder_e$condition <- "Personality Disorder"
personalitydisorder_f <- as.data.frame(round(prop.table(table(mh$Q123)),3)*100)
colnames(personalitydisorder_f)<- c("Var1", "%")
personalitydisorder_time <- right_join(personalitydisorder_e, personalitydisorder_f)
## Joining with `by = join_by(Var1)`
personalitydisorder_time <- personalitydisorder_time[,c(3,1,2,4)]
personalitydisorder_g <- as.data.frame(table(mh$Q124))
personalitydisorder_g$condition <- "Personality Disorder"
personalitydisorder_h <- as.data.frame(round(prop.table(table(mh$Q124)),3)*100)
colnames(personalitydisorder_h)<- c("Var1", "%")
personalitydisorder_prognosis <- right_join(personalitydisorder_g, personalitydisorder_h)
## Joining with `by = join_by(Var1)`
personalitydisorder_prognosis <- personalitydisorder_prognosis[,c(3,1,2,4)]
#ASD
mh$Q125 <- ifelse(mh$Q125 >=21, "21+", mh$Q125)
mh$Q125 <- ifelse(mh$Q125 <=15, "Below 15", mh$Q125)
ASD_c <- as.data.frame(table(mh$Q125))
ASD_c$condition <- "Autism Spectrum Disorder"
ASD_d <- as.data.frame(round(prop.table(table(mh$Q125)),3)*100)
colnames(ASD_d)<- c("Var1", "%")
ASD_age <- right_join(ASD_c, ASD_d)
## Joining with `by = join_by(Var1)`
ASD_age <- ASD_age[,c(3,1,2,4)]
ASD_e <- as.data.frame(table(mh$Q126))
ASD_e$condition <- "Autism Spectrum Disorder"
ASD_f <- as.data.frame(round(prop.table(table(mh$Q126)),3)*100)
colnames(ASD_f)<- c("Var1", "%")
ASD_time <- right_join(ASD_e, ASD_f)
## Joining with `by = join_by(Var1)`
ASD_time <- ASD_time[,c(3,1,2,4)]
ASD_g <- as.data.frame(table(mh$Q127))
ASD_g$condition <- "Autism Spectrum Disorder"
ASD_h <- as.data.frame(round(prop.table(table(mh$Q127)),3)*100)
colnames(ASD_h)<- c("Var1", "%")
ASD_prognosis <- right_join(ASD_g, ASD_h)
## Joining with `by = join_by(Var1)`
ASD_prognosis <- ASD_prognosis[,c(3,1,2,4)]
#ADHD
mh$Q128 <- ifelse(mh$Q128 >=21, "21+", mh$Q128)
mh$Q128 <- ifelse(mh$Q128 <=15, "Below 15", mh$Q128)
ADHD_c <- as.data.frame(table(mh$Q128))
ADHD_c$condition <- "Attention Deficit Hyperactivity Disorder"
ADHD_d <- as.data.frame(round(prop.table(table(mh$Q128)),3)*100)
colnames(ADHD_d)<- c("Var1", "%")
ADHD_age <- right_join(ADHD_c, ADHD_d)
## Joining with `by = join_by(Var1)`
ADHD_age <- ADHD_age[,c(3,1,2,4)]
ADHD_e <- as.data.frame(table(mh$Q129))
ADHD_e$condition <- "Attention Deficit Hyperactivity Disorder"
ADHD_f <- as.data.frame(round(prop.table(table(mh$Q129)),3)*100)
colnames(ADHD_f)<- c("Var1", "%")
ADHD_time <- right_join(ADHD_e, ADHD_f)
## Joining with `by = join_by(Var1)`
ADHD_time <- ADHD_time[,c(3,1,2,4)]
ADHD_g <- as.data.frame(table(mh$Q130))
ADHD_g$condition <- "Attention Deficit Hyperactivity Disorder"
ADHD_h <- as.data.frame(round(prop.table(table(mh$Q130)),3)*100)
colnames(ADHD_h)<- c("Var1", "%")
ADHD_prognosis <- right_join(ADHD_g, ADHD_h)
## Joining with `by = join_by(Var1)`
ADHD_prognosis <- ADHD_prognosis[,c(3,1,2,4)]
Supplementary_table_age <- rbind(depression_age, anxiety_age, socialanxiety_age,
anorexia_age, ASD_age, bingeeating_age, bulimia_age,
mania_age, OCD_age, panicattacks_age, psychosis_age,
personalitydisorder_age, ADHD_age)
Supplementary_table_timeandprog <- rbind(depression_time, anxiety_time, socialanxiety_time,
anorexia_time, ASD_time, bingeeating_time, bulimia_time,
mania_time, OCD_time, panicattacks_time,psychosis_time,
personalitydisorder_time, ADHD_time,depression_prognosis,
anxiety_prognosis, socialanxiety_prognosis,anorexia_prognosis,
ASD_prognosis, bingeeating_prognosis, bulimia_prognosis,
mania_prognosis,OCD_prognosis, panicattacks_prognosis,
psychosis_prognosis, personalitydisorder_prognosis,
ADHD_prognosis)
knitr::kable(Supplementary_table_age, "pipe", caption = "Supplementary Table 2: Age at the Time of Diagnosis")
| condition | Var1 | Freq | % |
|---|---|---|---|
| Depression | 16 | 8 | 11.4 |
| Depression | 17 | 9 | 12.9 |
| Depression | 18 | 6 | 8.6 |
| Depression | 19 | 8 | 11.4 |
| Depression | 20 | 2 | 2.9 |
| Depression | 21+ | 17 | 24.3 |
| Depression | Below 15 | 20 | 28.6 |
| Anxiety | 16 | 10 | 13.5 |
| Anxiety | 17 | 6 | 8.1 |
| Anxiety | 18 | 5 | 6.8 |
| Anxiety | 19 | 8 | 10.8 |
| Anxiety | 20 | 3 | 4.1 |
| Anxiety | 21+ | 18 | 24.3 |
| Anxiety | Below 15 | 24 | 32.4 |
| Social Anxiety | 16 | 4 | 16.7 |
| Social Anxiety | 17 | 4 | 16.7 |
| Social Anxiety | 18 | 1 | 4.2 |
| Social Anxiety | 19 | 2 | 8.3 |
| Social Anxiety | 21+ | 5 | 20.8 |
| Social Anxiety | Below 15 | 8 | 33.3 |
| Anorexia | 16 | 2 | 14.3 |
| Anorexia | 17 | 1 | 7.1 |
| Anorexia | 18 | 1 | 7.1 |
| Anorexia | 19 | 2 | 14.3 |
| Anorexia | 20 | 1 | 7.1 |
| Anorexia | 21+ | 2 | 14.3 |
| Anorexia | Below 15 | 5 | 35.7 |
| Autism Spectrum Disorder | 16 | 1 | 25.0 |
| Autism Spectrum Disorder | Below 15 | 3 | 75.0 |
| Binge Eating | 16 | 1 | 8.3 |
| Binge Eating | 19 | 2 | 16.7 |
| Binge Eating | 20 | 1 | 8.3 |
| Binge Eating | 21+ | 4 | 33.3 |
| Binge Eating | Below 15 | 4 | 33.3 |
| Bulimia | 16 | 2 | 25.0 |
| Bulimia | 19 | 1 | 12.5 |
| Bulimia | 21+ | 2 | 25.0 |
| Bulimia | Below 15 | 3 | 37.5 |
| Mania | 19 | 1 | 16.7 |
| Mania | 20 | 1 | 16.7 |
| Mania | 21+ | 2 | 33.3 |
| Mania | Below 15 | 2 | 33.3 |
| OCD | 16 | 1 | 10.0 |
| OCD | 17 | 1 | 10.0 |
| OCD | 19 | 2 | 20.0 |
| OCD | 20 | 1 | 10.0 |
| OCD | 21+ | 1 | 10.0 |
| OCD | Below 15 | 4 | 40.0 |
| Panic Attack Disorder | 16 | 7 | 17.5 |
| Panic Attack Disorder | 17 | 6 | 15.0 |
| Panic Attack Disorder | 18 | 4 | 10.0 |
| Panic Attack Disorder | 19 | 5 | 12.5 |
| Panic Attack Disorder | 21+ | 8 | 20.0 |
| Panic Attack Disorder | Below 15 | 10 | 25.0 |
| Psychosis | 21+ | 8 | 100.0 |
| Personality Disorder | 21+ | 8 | 100.0 |
| Attention Deficit Hyperactivity Disorder | 16 | 1 | 14.3 |
| Attention Deficit Hyperactivity Disorder | 19 | 2 | 28.6 |
| Attention Deficit Hyperactivity Disorder | 20 | 1 | 14.3 |
| Attention Deficit Hyperactivity Disorder | 21+ | 2 | 28.6 |
| Attention Deficit Hyperactivity Disorder | Below 15 | 1 | 14.3 |
knitr::kable(Supplementary_table_timeandprog, "pipe", caption = "Supplementary Table 2: Time & Prognosis of Diagnosis")
| condition | Var1 | Freq | % |
|---|---|---|---|
| Depression | after | 23 | 32.9 |
| Depression | before | 47 | 67.1 |
| Anxiety | after | 20 | 27.0 |
| Anxiety | before | 54 | 73.0 |
| Social Anxiety | after | 5 | 20.0 |
| Social Anxiety | before | 20 | 80.0 |
| Anorexia | after | 3 | 23.1 |
| Anorexia | before | 10 | 76.9 |
| Autism Spectrum Disorder | before | 4 | 100.0 |
| Binge Eating | after | 5 | 41.7 |
| Binge Eating | before | 7 | 58.3 |
| Bulimia | after | 2 | 25.0 |
| Bulimia | before | 6 | 75.0 |
| Mania | after | 3 | 50.0 |
| Mania | before | 3 | 50.0 |
| OCD | after | 1 | 9.1 |
| OCD | before | 10 | 90.9 |
| Panic Attack Disorder | after | 8 | 20.0 |
| Panic Attack Disorder | before | 32 | 80.0 |
| Psychosis | before | 4 | 100.0 |
| Personality Disorder | after | 5 | 55.6 |
| Personality Disorder | before | 4 | 44.4 |
| Attention Deficit Hyperactivity Disorder | after | 3 | 42.9 |
| Attention Deficit Hyperactivity Disorder | before | 4 | 57.1 |
| Depression | improved | 14 | 20.0 |
| Depression | same | 26 | 37.1 |
| Depression | worse | 30 | 42.9 |
| Anxiety | improved | 10 | 13.5 |
| Anxiety | same | 27 | 36.5 |
| Anxiety | worse | 37 | 50.0 |
| Social Anxiety | improved | 4 | 16.0 |
| Social Anxiety | same | 12 | 48.0 |
| Social Anxiety | worse | 9 | 36.0 |
| Anorexia | improved | 5 | 35.7 |
| Anorexia | same | 8 | 57.1 |
| Anorexia | worse | 1 | 7.1 |
| Autism Spectrum Disorder | improved | 1 | 25.0 |
| Autism Spectrum Disorder | same | 3 | 75.0 |
| Binge Eating | improved | 2 | 16.7 |
| Binge Eating | same | 3 | 25.0 |
| Binge Eating | worse | 7 | 58.3 |
| Bulimia | improved | 3 | 37.5 |
| Bulimia | same | 3 | 37.5 |
| Bulimia | worse | 2 | 25.0 |
| Mania | improved | 1 | 16.7 |
| Mania | same | 2 | 33.3 |
| Mania | worse | 3 | 50.0 |
| OCD | improved | 1 | 9.1 |
| OCD | same | 8 | 72.7 |
| OCD | worse | 2 | 18.2 |
| Panic Attack Disorder | improved | 10 | 25.0 |
| Panic Attack Disorder | same | 18 | 45.0 |
| Panic Attack Disorder | worse | 12 | 30.0 |
| Psychosis | same | 2 | 50.0 |
| Psychosis | worse | 2 | 50.0 |
| Personality Disorder | improved | 1 | 11.1 |
| Personality Disorder | same | 6 | 66.7 |
| Personality Disorder | worse | 2 | 22.2 |
| Attention Deficit Hyperactivity Disorder | improved | 1 | 14.3 |
| Attention Deficit Hyperactivity Disorder | same | 4 | 57.1 |
| Attention Deficit Hyperactivity Disorder | worse | 2 | 28.6 |
# cocaine
cocaine1 <- as.data.frame(table(pass$Q157_1))
cocaine1$drug<-"Cocaine"
cocaine2 <- as.data.frame(round(prop.table(table(pass$Q157_1)),3)*100)
colnames(cocaine2)<-c("Var1", "%")
cocaine <- right_join(cocaine1, cocaine2)
## Joining with `by = join_by(Var1)`
cocaine <- cocaine[,c(3,1,2,4)]
#crack
crack1 <- data.frame(table(pass$Q157_2))
crack1$drug<-"Crack"
crack2 <- as.data.frame(round(prop.table(table(pass$Q157_2)),3)*100)
colnames(crack2)<-c("Var1", "%")
crack <- right_join(crack1, crack2)
## Joining with `by = join_by(Var1)`
crack <- crack[,c(3,1,2,4)]
#MDMA
mdma1 <- as.data.frame(table(pass$Q157_3))
mdma1$drug<-"MDMA"
mdma2 <- as.data.frame(round(prop.table(table(pass$Q157_3)),3)*100)
colnames(mdma2)<-c("Var1", "%")
mdma <- right_join(mdma1, mdma2)
## Joining with `by = join_by(Var1)`
mdma <- mdma[,c(3,1,2,4)]
#inhalants
inhalants1 <- as.data.frame(table(pass$Q157_4) )
inhalants1$drug<-"Inhalants"
inhalants2 <- as.data.frame(round(prop.table(table(pass$Q157_4)),3)*100)
colnames(inhalants2)<-c("Var1", "%")
inhalants <- right_join(inhalants1, inhalants2)
## Joining with `by = join_by(Var1)`
inhalants <-inhalants[,c(3,1,2,4)]
#sedatives
sedatives1 <- as.data.frame(table(pass$Q157_5))
sedatives1$drug<-"Sedatives"
sedatives2 <- as.data.frame(round(prop.table(table(pass$Q157_5)),3)*100)
colnames(sedatives2)<-c("Var1", "%")
sedatives <- right_join(sedatives1, sedatives2)
## Joining with `by = join_by(Var1)`
sedatives <-sedatives[,c(3,1,2,4)]
# hallucinogens
hallucinogens1 <- as.data.frame(table(pass$Q157_6))
hallucinogens1$drug<-"Hallucinogens"
hallucinogens2 <- as.data.frame(round(prop.table(table(pass$Q157_6)),3)*100)
colnames(hallucinogens2)<-c("Var1", "%")
hallucinogens <- right_join(hallucinogens1, hallucinogens2)
## Joining with `by = join_by(Var1)`
hallucinogens <-hallucinogens[,c(3,1,2,4)]
#oppioids
oppioids1<- as.data.frame(table(pass$Q157_7))
oppioids1$drug<-"Oppioids"
oppioids2 <- as.data.frame(round(prop.table(table(pass$Q157_7)),3)*100)
colnames(oppioids2)<-c("Var1", "%")
oppioids <- right_join(oppioids1, oppioids2)
## Joining with `by = join_by(Var1)`
oppioids <-oppioids[,c(3,1,2,4)]
Supplementary_table3 <- rbind(cocaine,crack, mdma, inhalants, sedatives, hallucinogens, oppioids)
table(pass$Q156)
##
## no yes
## 191 48
#Supplementary table number of drugs used and number of times####
drugs <- filter(pass, pass$Q156 == 'yes')
dim(drugs)
## [1] 48 370
drugs <- drugs[,c(212:218)]
dim(drugs)
## [1] 48 7
#[1] 49 7
# creating binary yes or no variables and full scale variables for drug use
drugs$Cocaine <- "NA"
drugs$Cocaine <- ifelse(drugs$Q157_1=="no", 0, 1)
head(drugs$Cocaine)
## [1] 1 0 0 0 1 0
drugs$Cocaine <- as.numeric(drugs$Cocaine)
cocaine_a <- as.data.frame(table(drugs$Cocaine))
cocaine_b <- as.data.frame(round(prop.table(table(drugs$Cocaine)),3)*100)
colnames(cocaine_b)<-c("Var1", "%")
cocaine_N <- right_join(cocaine_a, cocaine_b)
## Joining with `by = join_by(Var1)`
cocaine_N$drug <- "Cocaine"
cocaine_N <-cocaine_N[,c(4,1,2,3)]
drugs$crack<- "NA"
drugs$crack <- ifelse(drugs$Q157_2=="no", 0, 1)
head(drugs$crack)
## [1] 0 0 0 0 0 0
drugs$crack<- as.numeric(drugs$crack)
crack_a <- as.data.frame(table(drugs$crack))
crack_b <- as.data.frame(round(prop.table(table(drugs$crack)),3)*100)
colnames(crack_b)<-c("Var1", "%")
crack_N <- right_join(crack_a, crack_b)
## Joining with `by = join_by(Var1)`
crack_N$drug <- "Crack"
crack_N <-crack_N[,c(4,1,2,3)]
drugs$mdma<- "NA"
drugs$mdma<- ifelse(drugs$Q157_3=="no", 0, 1)
head(drugs$mdma)
## [1] 0 0 1 0 1 0
drugs$mdma<- as.numeric(drugs$mdma)
mdma_a <- as.data.frame(table(drugs$mdma))
mdma_b <- as.data.frame(round(prop.table(table(drugs$mdma)),3)*100)
colnames(mdma_b)<-c("Var1", "%")
mdma_N <- right_join(mdma_a, mdma_b)
## Joining with `by = join_by(Var1)`
mdma_N$drug <- "MDMA"
mdma_N <-mdma_N[,c(4,1,2,3)]
drugs$inhalants<- "NA"
drugs$inhalants<- ifelse(drugs$Q157_4=="no", 0, 1)
head(drugs$inhalants)
## [1] 1 0 0 1 0 0
drugs$inhalants<- as.numeric(drugs$inhalants)
inhalants_a <- as.data.frame(table(drugs$inhalants))
inhalants_b <- as.data.frame(round(prop.table(table(drugs$inhalants)),3)*100)
colnames(inhalants_b)<-c("Var1", "%")
inhalants_N <- right_join(inhalants_a, inhalants_b)
## Joining with `by = join_by(Var1)`
inhalants_N$drug <- "Inhalants"
inhalants_N <-inhalants_N[,c(4,1,2,3)]
drugs$sedatives<- "NA"
drugs$sedatives<- ifelse(drugs$Q157_5=="no", 0, 1)
head(drugs$sedatives)
## [1] 0 0 0 0 0 1
drugs$sedatives<- as.numeric(drugs$sedatives)
sedatives_a <- as.data.frame(table(drugs$sedatives))
sedatives_b <- as.data.frame(round(prop.table(table(drugs$sedatives)),3)*100)
colnames(sedatives_b)<-c("Var1", "%")
sedatives_N <- right_join(sedatives_a, sedatives_b)
## Joining with `by = join_by(Var1)`
sedatives_N$drug <- "Sedatives"
sedatives_N <-sedatives_N[,c(4,1,2,3)]
drugs$hallucinogens<- "NA"
drugs$hallucinogens<- ifelse(drugs$Q157_6=="no", 0, 1)
head(drugs$hallucinogens)
## [1] 0 1 0 1 0 0
drugs$hallucinogens<- as.numeric(drugs$hallucinogens)
hallucinogens_a <- as.data.frame(table(drugs$hallucinogens))
hallucinogens_b <- as.data.frame(round(prop.table(table(drugs$hallucinogens)),3)*100)
colnames(hallucinogens_b)<-c("Var1", "%")
hallucinogens_N <- right_join(hallucinogens_a, hallucinogens_b)
## Joining with `by = join_by(Var1)`
hallucinogens_N$drug <- "Hallucinogens"
hallucinogens_N <-hallucinogens_N[,c(4,1,2,3)]
drugs$oppioids<- "NA"
drugs$oppioids<- ifelse(drugs$Q157_7=="no", 0, 1)
head(drugs$oppioids)
## [1] 0 0 0 0 0 0
drugs$oppioids<- as.numeric(drugs$oppioids)
oppioids_a <- as.data.frame(table(drugs$oppioids))
oppioids_b <- as.data.frame(round(prop.table(table(drugs$oppioids)),3)*100)
colnames(oppioids_b)<-c("Var1", "%")
oppioids_N <- right_join(oppioids_a, oppioids_b)
## Joining with `by = join_by(Var1)`
oppioids_N$drug <- "Oppioids"
oppioids_N <-oppioids_N[,c(4,1,2,3)]
drugs$total_drugs_used = rowSums(drugs[,c(8:14)], na.rm=TRUE)*NA^!rowSums(!is.na(drugs[,c(8:14)]))
total_a <- as.data.frame(table(drugs$total_drugs_used))
total_b <- as.data.frame(round(prop.table(table(drugs$total_drugs_used)),3)*100)
colnames(total_b)<-c("Var1", "%")
total_N <- right_join(total_a, total_b)
## Joining with `by = join_by(Var1)`
total_N$drug <- "Total"
total_N <-total_N[,c(4,1,2,3)]
Supplementary_table8 <-total_N[,c(4,1,2,3)]
Supplementary_table4 <- rbind(cocaine_N,crack_N, mdma_N, inhalants_N, sedatives_N, hallucinogens_N, oppioids_N)
Supplementary_table3$Var1 <- as.character(Supplementary_table3$Var1)
knitr::kable(Supplementary_table3, "pipe", caption = "Supplementary Table 4: Drug used and Amount of time")
| drug | Var1 | Freq | % |
|---|---|---|---|
| Cocaine | 10+ times | 8 | 17.4 |
| Cocaine | 2-5 times | 6 | 13.0 |
| Cocaine | 6-10 times | 5 | 10.9 |
| Cocaine | no | 19 | 41.3 |
| Cocaine | once | 8 | 17.4 |
| Crack | 10+ times | 1 | 2.2 |
| Crack | no | 45 | 97.8 |
| MDMA | 10+ times | 12 | 26.1 |
| MDMA | 2-5 times | 6 | 13.0 |
| MDMA | 6-10 times | 3 | 6.5 |
| MDMA | no | 18 | 39.1 |
| MDMA | once | 7 | 15.2 |
| Inhalants | 10+ times | 1 | 2.2 |
| Inhalants | 2-5 times | 6 | 13.0 |
| Inhalants | 6-10 times | 1 | 2.2 |
| Inhalants | no | 35 | 76.1 |
| Inhalants | once | 3 | 6.5 |
| Sedatives | 10+ times | 1 | 2.2 |
| Sedatives | 2-5 times | 4 | 8.7 |
| Sedatives | 6-10 times | 1 | 2.2 |
| Sedatives | no | 35 | 76.1 |
| Sedatives | once | 5 | 10.9 |
| Hallucinogens | 10+ times | 3 | 6.7 |
| Hallucinogens | 2-5 times | 13 | 28.9 |
| Hallucinogens | 6-10 times | 2 | 4.4 |
| Hallucinogens | no | 20 | 44.4 |
| Hallucinogens | once | 7 | 15.6 |
| Oppioids | 10+ times | 3 | 6.5 |
| Oppioids | 2-5 times | 1 | 2.2 |
| Oppioids | no | 40 | 87.0 |
| Oppioids | once | 2 | 4.3 |
knitr::kable(Supplementary_table4, "pipe", caption = "Supplementary Table 5: Participant per drug")
| drug | Var1 | Freq | % |
|---|---|---|---|
| Cocaine | 0 | 19 | 41.3 |
| Cocaine | 1 | 27 | 58.7 |
| Crack | 0 | 45 | 97.8 |
| Crack | 1 | 1 | 2.2 |
| MDMA | 0 | 18 | 39.1 |
| MDMA | 1 | 28 | 60.9 |
| Inhalants | 0 | 35 | 76.1 |
| Inhalants | 1 | 11 | 23.9 |
| Sedatives | 0 | 35 | 76.1 |
| Sedatives | 1 | 11 | 23.9 |
| Hallucinogens | 0 | 20 | 44.4 |
| Hallucinogens | 1 | 25 | 55.6 |
| Oppioids | 0 | 40 | 87.0 |
| Oppioids | 1 | 6 | 13.0 |
z.score <- function(data) {
new_data <- round(((data - mean(data, na.rm = TRUE))/sd(data, na.rm = TRUE)),1)
return(new_data)}
# Linear Regressions ####
pass$n_ethnicity<-pass$nethnicity
pass$n_ethnicity<-ifelse(pass$n_ethnicity=="Unknown", NA, pass$n_ethnicity)
pass$n_orientation<-pass$orientation
pass$n_orientation<-ifelse(pass$n_orientation=="Unknown", NA, pass$n_orientation)
pass$n_disability<-pass$disability
pass$n_disability<-ifelse(pass$n_disability=="Unknown", NA, pass$n_disability)
pass$UGPG<-as.factor(pass$UGPG)
pass$n_ethnicity<-as.factor(pass$n_ethnicity)
pass$n_gender<-as.factor(pass$gender)
pass$n_orientation<-as.factor(pass$n_orientation)
pass$student.status <-as.factor(pass$student.status)
pass$n_year<-as.factor(pass$year)
pass$n_disability <- as.factor(pass$n_disability)
pass$age <- as.numeric(pass$age)
contrasts(pass$n_disability) <- c(1,0)
contrasts(pass$UGPG) <- c(1,0)
contrasts(pass$n_ethnicity) <- c(1,0)
contrasts(pass$n_gender) <- cbind(c(1,0,0),
c(0,0,1))
contrasts(pass$n_year)
## Year 2 Year 3 Year 4+
## Year 1 0 0 0
## Year 2 1 0 0
## Year 3 0 1 0
## Year 4+ 0 0 1
contrasts(pass$n_orientation)
## Sexual Minority
## Heterosexual 0
## Sexual Minority 1
contrasts(pass$student.status)<- cbind(c(1,0,0),
c(0,0,1))
#Standardised scores
pass$unil_z <- z.score(pass$uni.loneliness)
pass$prel_z <- z.score(pass$pre.loneliness)
pass$PHQz <- z.score(pass$PHQ)
pass$GADz <- z.score(pass$GAD)
pass$SAz <- z.score(pass$social.anxiety)
pass$SCz <- z.score(pass$self.control)
pass$AUDITz <- z.score(pass$AUDIT)
pass$CUDITz <- z.score(pass$CUDIT)
pass$PSz <- z.score(pass$perceived.stress)
pass$wellbeingz <- z.score(pass$wellbeing)
pass$SCInz <- z.score(pass$SCIn)
pass$perfectionismz <- z.score(pass$perfectionism)
pass$SE_aca_z <- z.score(pass$SE.academic)
pass$SE_acc_z <- z.score(pass$SE.academic)
pass$SE_fr_z <- z.score(pass$SE.friends)
pass$SE_co_z <- z.score(pass$SE.community)
#Recoding finance
pass$Q80 <- dplyr::recode(pass$Q80, `5` = "1", `1` = "5", `2` ="4", `3` ="3", `4` ="2")
pass$Q80 <- as.numeric(pass$Q80)
pass$Q81 <- dplyr::recode(pass$Q81, `5` = "1", `1` = "5", `2` ="4", `3` ="3", `4` ="2")
pass$Q81 <- as.numeric(pass$Q81)
pass$Q82 <- dplyr::recode(pass$Q82, `5` = "1", `1` = "5", `2` ="4", `3` ="3", `4` ="2")
pass$Q82 <- as.numeric(pass$Q82)
pass$SE.finances_n<- rowSums(pass[,c(109, 110, 112)], na.rm = TRUE)*NA^!rowSums(!is.na(pass[,c(109, 110, 112)]))
str(pass$SE.finances_n)
## num [1:242] 3 8 11 6 5 7 9 8 9 11 ...
head(pass$SE.finances_n)
## [1] 3 8 11 6 5 7
pass$SE_fi_z <- z.score(pass$SE.finances_n)
#GAD demo####
GAD_UGPG <- lm(GADz~ UGPG, pass)
GAD_n_ethnicity <- lm(GADz~ n_ethnicity, pass)
GAD_n_gender <- lm(GADz~ n_gender, pass)
GAD_n_orientation <- lm(GADz~ n_orientation, pass)
GAD_student.status<- lm(GADz~ student.status, pass)
GAD_n_year <- lm(GADz~ n_year, pass)
GAD_n_disability <- lm(GADz~ n_disability, pass)
GAD_Multiple <- lm(GADz~ n_disability+student.status+n_orientation+
n_ethnicity+n_gender+UGPG+n_year+age, pass)
summary(GAD_UGPG)
##
## Call:
## lm(formula = GADz ~ UGPG, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.3236 -0.8236 -0.2859 0.7453 2.4518
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.02357 0.07996 0.295 0.768
## UGPG1 -0.07533 0.13493 -0.558 0.577
##
## Residual standard error: 1.002 on 240 degrees of freedom
## Multiple R-squared: 0.001297, Adjusted R-squared: -0.002864
## F-statistic: 0.3117 on 1 and 240 DF, p-value: 0.5771
summary(GAD_n_disability)
##
## Call:
## lm(formula = GADz ~ n_disability, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.6842 -0.7842 -0.3017 0.5557 2.5807
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.18073 0.06869 -2.631 0.00909 **
## n_disability1 0.86494 0.16899 5.118 6.55e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9518 on 228 degrees of freedom
## (12 observations deleted due to missingness)
## Multiple R-squared: 0.1031, Adjusted R-squared: 0.09912
## F-statistic: 26.2 on 1 and 228 DF, p-value: 6.548e-07
summary(GAD_n_ethnicity)
##
## Call:
## lm(formula = GADz ~ n_ethnicity, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.3054 -0.8054 -0.2785 0.7946 2.4215
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.005442 0.083002 0.066 0.948
## n_ethnicity1 -0.026948 0.133338 -0.202 0.840
##
## Residual standard error: 1.006 on 238 degrees of freedom
## (2 observations deleted due to missingness)
## Multiple R-squared: 0.0001716, Adjusted R-squared: -0.004029
## F-statistic: 0.04084 on 1 and 238 DF, p-value: 0.84
summary(GAD_n_gender)
##
## Call:
## lm(formula = GADz ~ n_gender, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.3057 -0.8057 -0.3057 0.7443 2.3943
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.1179 0.1896 -0.622 0.535
## n_gender1 0.3979 0.4870 0.817 0.415
## n_gender2 0.1236 0.2019 0.612 0.541
##
## Residual standard error: 1.003 on 239 degrees of freedom
## Multiple R-squared: 0.003257, Adjusted R-squared: -0.005084
## F-statistic: 0.3905 on 2 and 239 DF, p-value: 0.6771
summary(GAD_n_orientation)
##
## Call:
## lm(formula = GADz ~ n_orientation, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.6532 -0.7580 -0.2532 0.6468 2.5373
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.1373 0.0759 -1.809 0.071801 .
## n_orientationSexual Minority 0.4905 0.1465 3.348 0.000951 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9867 on 229 degrees of freedom
## (11 observations deleted due to missingness)
## Multiple R-squared: 0.04667, Adjusted R-squared: 0.04251
## F-statistic: 11.21 on 1 and 229 DF, p-value: 0.0009509
summary(GAD_n_year)
##
## Call:
## lm(formula = GADz ~ n_year, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.4486 -0.7486 -0.2486 0.6514 2.3462
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.14861 0.08164 1.820 0.069980 .
## n_yearYear 2 -0.22756 0.17868 -1.274 0.204057
## n_yearYear 3 -0.29476 0.17686 -1.667 0.096890 .
## n_yearYear 4+ -0.78671 0.22885 -3.438 0.000693 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9797 on 238 degrees of freedom
## Multiple R-squared: 0.05305, Adjusted R-squared: 0.04112
## F-statistic: 4.445 on 3 and 238 DF, p-value: 0.004635
summary(GAD_student.status)
##
## Call:
## lm(formula = GADz ~ student.status, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.375 -0.797 -0.236 0.725 2.588
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.07500 0.08975 0.836 0.404
## student.status1 -0.26346 0.16511 -1.596 0.112
## student.status2 -0.07803 0.15227 -0.512 0.609
##
## Residual standard error: 0.9994 on 239 degrees of freedom
## Multiple R-squared: 0.01054, Adjusted R-squared: 0.002261
## F-statistic: 1.273 on 2 and 239 DF, p-value: 0.2819
summary(GAD_Multiple)
##
## Call:
## lm(formula = GADz ~ n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.7708 -0.6369 -0.1206 0.5604 2.5533
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.41840 0.40974 1.021 0.30840
## n_disability1 0.77475 0.19056 4.066 6.84e-05 ***
## student.status1 -0.30813 0.17284 -1.783 0.07611 .
## student.status2 -0.06096 0.17299 -0.352 0.72492
## n_orientationSexual Minority 0.30993 0.15484 2.002 0.04666 *
## n_ethnicity1 -0.02670 0.15264 -0.175 0.86129
## n_gender1 -0.38011 0.53382 -0.712 0.47724
## n_gender2 0.11048 0.20205 0.547 0.58512
## UGPG1 0.03608 0.17264 0.209 0.83469
## n_yearYear 2 -0.34991 0.19688 -1.777 0.07701 .
## n_yearYear 3 -0.38663 0.18751 -2.062 0.04049 *
## n_yearYear 4+ -0.70800 0.24613 -2.877 0.00445 **
## age -0.02223 0.01726 -1.288 0.19928
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9362 on 204 degrees of freedom
## (25 observations deleted due to missingness)
## Multiple R-squared: 0.2007, Adjusted R-squared: 0.1537
## F-statistic: 4.269 on 12 and 204 DF, p-value: 5.064e-06
PHQ_UGPG <- lm(PHQz~ UGPG, pass)
PHQ_n_ethnicity <- lm(PHQz~ n_ethnicity, pass)
PHQ_n_gender <- lm(PHQz~ n_gender, pass)
PHQ_n_orientation <- lm(PHQz~ n_orientation, pass)
PHQ_student.status<- lm(PHQz~ student.status, pass)
PHQ_n_year <- lm(PHQz~ n_year, pass)
PHQ_n_disability <- lm(PHQz~ n_disability, pass)
PHQ_Multiple <- lm(PHQz~ n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age, pass)
summary(PHQ_UGPG)
##
## Call:
## lm(formula = PHQz ~ UGPG, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.4803 -0.8802 -0.1802 0.7482 2.9577
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.08025 0.07985 1.005 0.3159
## UGPG1 -0.23790 0.13473 -1.766 0.0787 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.001 on 240 degrees of freedom
## Multiple R-squared: 0.01282, Adjusted R-squared: 0.008711
## F-statistic: 3.118 on 1 and 240 DF, p-value: 0.07872
summary(PHQ_n_disability)
##
## Call:
## lm(formula = PHQz ~ n_disability, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.1395 -0.6896 -0.2395 0.5104 3.0104
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.21042 0.06746 -3.119 0.00205 **
## n_disability1 0.94989 0.16597 5.723 3.27e-08 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9348 on 228 degrees of freedom
## (12 observations deleted due to missingness)
## Multiple R-squared: 0.1256, Adjusted R-squared: 0.1218
## F-statistic: 32.76 on 1 and 228 DF, p-value: 3.271e-08
summary(PHQ_n_ethnicity)
##
## Call:
## lm(formula = PHQz ~ n_ethnicity, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.4027 -0.8027 -0.2949 0.7973 2.8129
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.002721 0.083403 0.033 0.974
## n_ethnicity1 -0.015624 0.133981 -0.117 0.907
##
## Residual standard error: 1.011 on 238 degrees of freedom
## (2 observations deleted due to missingness)
## Multiple R-squared: 5.714e-05, Adjusted R-squared: -0.004144
## F-statistic: 0.0136 on 1 and 238 DF, p-value: 0.9073
summary(PHQ_n_gender)
##
## Call:
## lm(formula = PHQz ~ n_gender, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.3857 -0.7856 -0.2857 0.7643 2.8144
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.07143 0.18925 -0.377 0.7062
## n_gender1 0.91143 0.48618 1.875 0.0621 .
## n_gender2 0.05707 0.20152 0.283 0.7773
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.001 on 239 degrees of freedom
## Multiple R-squared: 0.01525, Adjusted R-squared: 0.007008
## F-statistic: 1.85 on 2 and 239 DF, p-value: 0.1594
summary(PHQ_n_orientation)
##
## Call:
## lm(formula = PHQz ~ n_orientation, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.5532 -0.7657 -0.1657 0.6343 2.9343
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.13432 0.07627 -1.761 0.07955 .
## n_orientationSexual Minority 0.48755 0.14721 3.312 0.00108 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9915 on 229 degrees of freedom
## (11 observations deleted due to missingness)
## Multiple R-squared: 0.04571, Adjusted R-squared: 0.04154
## F-statistic: 10.97 on 1 and 229 DF, p-value: 0.001077
summary(PHQ_n_year)
##
## Call:
## lm(formula = PHQz ~ n_year, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.4500 -0.8289 -0.2282 0.7500 2.8710
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.05000 0.08318 0.601 0.5484
## n_yearYear 2 -0.12105 0.18204 -0.665 0.5067
## n_yearYear 3 0.07821 0.18019 0.434 0.6647
## n_yearYear 4+ -0.54048 0.23316 -2.318 0.0213 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9982 on 238 degrees of freedom
## Multiple R-squared: 0.02565, Adjusted R-squared: 0.01337
## F-statistic: 2.088 on 3 and 238 DF, p-value: 0.1024
summary(PHQ_student.status)
##
## Call:
## lm(formula = PHQz ~ student.status, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.5193 -0.7332 -0.2379 0.7806 2.7212
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.11935 0.08977 1.330 0.1849
## student.status1 -0.34051 0.16515 -2.062 0.0403 *
## student.status2 -0.18148 0.15231 -1.191 0.2346
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9996 on 239 degrees of freedom
## Multiple R-squared: 0.01874, Adjusted R-squared: 0.01053
## F-statistic: 2.283 on 2 and 239 DF, p-value: 0.1042
summary(PHQ_Multiple)
##
## Call:
## lm(formula = PHQz ~ n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.5122 -0.6573 -0.2387 0.4786 2.6964
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.648290 0.407860 1.589 0.1135
## n_disability1 0.848812 0.189682 4.475 1.27e-05 ***
## student.status1 -0.331933 0.172043 -1.929 0.0551 .
## student.status2 -0.147010 0.172193 -0.854 0.3942
## n_orientationSexual Minority 0.218346 0.154131 1.417 0.1581
## n_ethnicity1 0.084540 0.151934 0.556 0.5785
## n_gender1 0.218510 0.531365 0.411 0.6813
## n_gender2 0.038327 0.201122 0.191 0.8491
## UGPG1 -0.030081 0.171851 -0.175 0.8612
## n_yearYear 2 -0.214235 0.195976 -1.093 0.2756
## n_yearYear 3 -0.006915 0.186653 -0.037 0.9705
## n_yearYear 4+ -0.345010 0.244999 -1.408 0.1606
## age -0.035135 0.017182 -2.045 0.0422 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9319 on 204 degrees of freedom
## (25 observations deleted due to missingness)
## Multiple R-squared: 0.1982, Adjusted R-squared: 0.151
## F-statistic: 4.202 on 12 and 204 DF, p-value: 6.573e-06
car::Anova(PHQ_Multiple, type ="III")
### Assumption Check for demo #####
car::leveneTest(lm(GADz~ UGPG, pass)) #good
car::leveneTest(lm(GADz~ n_ethnicity, pass))#good
car::leveneTest(lm(GADz~ n_gender, pass))#good
car::leveneTest(lm(GADz~ n_orientation, pass))#good
car::leveneTest(lm(GADz~ student.status, pass))#good
car::leveneTest(lm(GADz~ n_year, pass))#good
car::leveneTest(lm(GADz~ n_disability, pass))#good
car::leveneTest(lm(PHQz~ UGPG, pass)) #good
car::leveneTest(lm(PHQz~ n_ethnicity, pass))#good
car::leveneTest(lm(PHQz~ n_gender, pass))#good
car::leveneTest(lm(PHQz~ n_orientation, pass))#good
car::leveneTest(lm(PHQz~ student.status, pass))#good
car::leveneTest(lm(PHQz~ n_year, pass))#good
car::leveneTest(lm(PHQz~ n_disability, pass))#good
DVIF <- car::vif(GAD_Multiple)
1/DVIF #GOOD
## GVIF Df GVIF^(1/(2*Df))
## n_disability 0.7864075 1.0000000 0.8867962
## student.status 0.6505352 0.5000000 0.8980855
## n_orientation 0.8902581 1.0000000 0.9435349
## n_ethnicity 0.7339713 1.0000000 0.8567213
## n_gender 0.8217266 0.5000000 0.9520984
## UGPG 0.5821800 1.0000000 0.7630072
## n_year 0.7150111 0.3333333 0.9456247
## age 0.5619035 1.0000000 0.7496022
DVIF2 <- car::vif(PHQ_Multiple)
1/DVIF2 #GOOD
## GVIF Df GVIF^(1/(2*Df))
## n_disability 0.7864075 1.0000000 0.8867962
## student.status 0.6505352 0.5000000 0.8980855
## n_orientation 0.8902581 1.0000000 0.9435349
## n_ethnicity 0.7339713 1.0000000 0.8567213
## n_gender 0.8217266 0.5000000 0.9520984
## UGPG 0.5821800 1.0000000 0.7630072
## n_year 0.7150111 0.3333333 0.9456247
## age 0.5619035 1.0000000 0.7496022
psych::describe(stats::resid(PHQ_UGPG))
psych::describe(stats::resid(PHQ_n_disability))
psych::describe(stats::resid(PHQ_n_ethnicity))
psych::describe(stats::resid(PHQ_n_orientation))
psych::describe(stats::resid(PHQ_n_gender))
psych::describe(stats::resid(PHQ_n_year))
## ALL SKEWED +
psych::describe(stats::resid(GAD_UGPG))
psych::describe(stats::resid(GAD_n_disability))
psych::describe(stats::resid(GAD_n_ethnicity))
psych::describe(stats::resid(GAD_n_orientation))
psych::describe(stats::resid(GAD_n_gender))
psych::describe(stats::resid(GAD_n_year))
## ALL SKEWED +
summary(stats::cooks.distance(GAD_UGPG))
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 1.396e-05 8.808e-04 2.179e-03 4.297e-03 5.395e-03 3.607e-02
summary(stats::cooks.distance(GAD_n_disability))
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 1.893e-05 5.106e-04 1.771e-03 4.540e-03 3.639e-03 4.510e-02
summary(stats::cooks.distance(GAD_n_ethnicity))
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 3.044e-05 8.698e-04 2.209e-03 4.259e-03 5.194e-03 3.181e-02
summary(stats::cooks.distance(GAD_n_orientation))
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 4.274e-06 5.881e-04 2.289e-03 4.107e-03 4.158e-03 2.919e-02
summary(stats::cooks.distance(GAD_n_gender))
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 4.060e-06 4.094e-04 1.039e-03 3.223e-03 2.729e-03 6.962e-02
summary(stats::cooks.distance(GAD_n_year))
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.0000032 0.0003737 0.0016544 0.0035522 0.0044143 0.0387202
#NO OUTLIER
summary(stats::cooks.distance(PHQ_UGPG))
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 1.999e-05 5.677e-04 2.497e-03 4.187e-03 5.343e-03 5.263e-02
summary(stats::cooks.distance(PHQ_n_disability))
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 2.417e-05 4.093e-04 1.432e-03 4.662e-03 3.713e-03 7.270e-02
summary(stats::cooks.distance(PHQ_n_ethnicity))
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 2.000e-08 8.339e-04 2.173e-03 4.375e-03 4.878e-03 4.251e-02
summary(stats::cooks.distance(PHQ_n_orientation))
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 3.587e-06 4.073e-04 1.786e-03 4.084e-03 4.879e-03 2.890e-02
summary(stats::cooks.distance(PHQ_n_gender))
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 3.300e-07 3.787e-04 1.260e-03 3.170e-03 2.904e-03 7.683e-02
summary(stats::cooks.distance(PHQ_n_year))
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 1.190e-06 5.345e-04 1.438e-03 3.883e-03 3.715e-03 5.741e-02
#NO OUTLIER
plot(PHQ_UGPG)
plot(PHQ_n_disability)
plot(PHQ_n_ethnicity)
plot(PHQ_n_orientation)
plot(PHQ_n_gender)
plot(PHQ_n_year)
### PHQ table demo ####
PHQ_UGPGt <- export_summs(PHQ_UGPG, scale = TRUE)
PHQ_n_ethnicityt <- export_summs(PHQ_n_ethnicity,scale = TRUE)
PHQ_n_gendert <-export_summs(PHQ_n_gender,scale = TRUE)
PHQ_n_disabilityt <- export_summs(PHQ_n_disability,scale = TRUE)
PHQ_n_orientationt <- export_summs(PHQ_n_orientation,scale = TRUE)
PHQ_n_yeart <- export_summs(PHQ_n_year,scale = TRUE)
PHQ_student.statust <- export_summs(PHQ_student.status,scale = TRUE)
PHQ_Multiplet <- export_summs(PHQ_Multiple,scale = TRUE)
PHQ_UGPGr <- filter(PHQ_UGPGt, names == "R2")
PHQ_n_ethnicityr <- filter(PHQ_n_ethnicityt, names == "R2")
PHQ_n_genderr <- filter(PHQ_n_gendert, names == "R2")
PHQ_n_disabilityr <- filter(PHQ_n_disabilityt, names == "R2")
PHQ_n_orientationr <- filter(PHQ_n_orientationt, names == "R2")
PHQ_n_yearr <- filter(PHQ_n_yeart, names == "R2")
PHQ_student.statusr <- filter(PHQ_student.statust, names == "R2")
PHQ_Multipler <- filter(PHQ_Multiplet, names == "R2")
PHQ_UGPGr <- PHQ_UGPGr[,2]
PHQ_n_ethnicityr <- PHQ_n_ethnicityr[,2]
PHQ_n_genderr <-PHQ_n_genderr[,2]
PHQ_n_disabilityr <- PHQ_n_disabilityr[,2]
PHQ_n_orientationr <- PHQ_n_orientationr[,2]
PHQ_n_yearr <- PHQ_n_yearr[,2]
PHQ_student.statusr <- PHQ_student.statusr[,2]
PHQ_Multipler <- PHQ_Multipler[,2]
PHQ_UGPGr$model <- "UGPG"
PHQ_n_ethnicityr$model <- "ethnicity"
PHQ_n_genderr$model <- "gender"
PHQ_n_disabilityr$model <- "disability"
PHQ_n_orientationr$model <- "orientation"
PHQ_n_yearr$model <- "year"
PHQ_student.statusr$model <- "student.status"
PHQ_Multipler$model <- "Multiple"
rsquared_demo <- rbind(PHQ_UGPGr, PHQ_student.statusr,
PHQ_n_ethnicityr, PHQ_n_disabilityr, PHQ_n_orientationr,
PHQ_n_genderr,PHQ_n_yearr)
colnames(rsquared_demo)<- c("rsquared", "model")
PHQ_UGPGn <- filter(PHQ_UGPGt, names == "N")
PHQ_n_ethnicityn <- filter(PHQ_n_ethnicityt, names == "N")
PHQ_n_gendern <- filter(PHQ_n_gendert, names == "N")
PHQ_n_disabilityn <- filter(PHQ_n_disabilityt, names == "N")
PHQ_n_orientationn <- filter(PHQ_n_orientationt, names == "N")
PHQ_n_yearn <- filter(PHQ_n_yeart, names == "N")
PHQ_student.statusn <- filter(PHQ_student.statust, names == "N")
PHQ_Multiplen <- filter(PHQ_Multiplet, names == "N")
PHQ_UGPGn <- PHQ_UGPGn[,2]
PHQ_n_ethnicityn <- PHQ_n_ethnicityn[,2]
PHQ_n_gendern <-PHQ_n_gendern[,2]
PHQ_n_disabilityn <- PHQ_n_disabilityn[,2]
PHQ_n_orientationn <- PHQ_n_orientationn[,2]
PHQ_n_yearn <- PHQ_n_yearn[,2]
PHQ_student.statusn <- PHQ_student.statusn[,2]
PHQ_Multiplen <- PHQ_Multiplen[,2]
PHQ_UGPGn$model <- "UGPG"
PHQ_n_ethnicityn$model <- "ethnicity"
PHQ_n_gendern$model <- "gender"
PHQ_n_disabilityn$model <- "disability"
PHQ_n_orientationn$model <- "orientation"
PHQ_n_yearn$model <- "year"
PHQ_student.statusn$model <- "student.status"
PHQ_Multiplen$model <- "Multiple"
n_demo <- rbind(PHQ_UGPGn, PHQ_student.statusn,
PHQ_n_ethnicityn, PHQ_n_disabilityn, PHQ_n_orientationn,
PHQ_n_gendern,PHQ_n_yearn)
colnames(n_demo)<- c("n", "model")
PHQ_UGPGcol <-tidy(PHQ_UGPG) %>%mutate(model = "UGPG")
PHQ_n_ethnicitycol <-tidy(PHQ_n_ethnicity) %>% mutate(model = "ethnicity")
PHQ_n_gendercol <-tidy(PHQ_n_gender) %>% mutate(model = "gender")
PHQ_n_disabilitycol <-tidy(PHQ_n_disability) %>% mutate(model = "disability")
PHQ_n_orientationcol <-tidy(PHQ_n_orientation) %>% mutate(model = "orientation")
PHQ_n_yearcol <-tidy(PHQ_n_year) %>% mutate(model = "year")
PHQ_student.statuscol <-tidy(PHQ_student.status) %>%
mutate(model = "student.status")
PHQ_UGPGcol[PHQ_UGPGcol == "(Intercept)"] <- "UGPG"
PHQ_n_ethnicitycol[PHQ_n_ethnicitycol == "(Intercept)"] <- "n_ethnicity"
PHQ_n_gendercol[PHQ_n_gendercol == "(Intercept)"] <- "n_gender"
PHQ_n_disabilitycol[PHQ_n_disabilitycol== "(Intercept)"] <- "n_disability"
PHQ_n_orientationcol[PHQ_n_orientationcol == "(Intercept)"] <- "n_orientation"
PHQ_n_yearcol[PHQ_n_yearcol == "(Intercept)"] <- "n_year"
PHQ_student.statuscol[PHQ_student.statuscol== "(Intercept)"] <- "student.status"
all_models_demo<- rbind(PHQ_UGPGcol,
PHQ_n_ethnicitycol,
PHQ_n_gendercol,
PHQ_n_disabilitycol,
PHQ_n_orientationcol,
PHQ_n_yearcol,
PHQ_student.statuscol)
PHQ_Multiple_col <- tidy(PHQ_Multiple) %>% mutate(model = "Multiple")
finaltable1_PHQ_demo <- right_join( all_models_demo, rsquared_demo)
## Joining with `by = join_by(model)`
finaltable1_PHQ_demo <- right_join( n_demo, finaltable1_PHQ_demo )
## Joining with `by = join_by(model)`
## Warning in right_join(n_demo, finaltable1_PHQ_demo): Each row in `x` is expected to match at most 1 row in `y`.
## ℹ Row 1 of `x` matches multiple rows.
## ℹ If multiple matches are expected, set `multiple = "all"` to silence this
## warning.
finaltable1_PHQ_demo <- as.data.frame(finaltable1_PHQ_demo)
colnames(finaltable1_PHQ_demo)<- c("N","Model", "term", "beta", "SE", "t", "p",
"rsquared" )
finaltable1_PHQ_demo$beta <- round(finaltable1_PHQ_demo$beta, digits = 2)
finaltable1_PHQ_demo$rsquared <- as.numeric(finaltable1_PHQ_demo$rsquared)
finaltable1_PHQ_demo$rsquared <- round(finaltable1_PHQ_demo$rsquared, digits = 2)
finaltable1_PHQ_demo$p <- round(finaltable1_PHQ_demo$p, digits = 3)
finaltable1_PHQ_demo <- finaltable1_PHQ_demo[,c(3,1,4,8,7)]
finaltable1_PHQ_demo$criterion <- "PHQ"
#### GAD tables demo####
GAD_UGPGt <- export_summs(GAD_UGPG, scale = TRUE)
GAD_n_ethnicityt <- export_summs(GAD_n_ethnicity,scale = TRUE)
GAD_n_gendert <-export_summs(GAD_n_gender,scale = TRUE)
GAD_n_disabilityt <- export_summs(GAD_n_disability,scale = TRUE)
GAD_n_orientationt <- export_summs(GAD_n_orientation,scale = TRUE)
GAD_n_yeart <- export_summs(GAD_n_year,scale = TRUE)
GAD_student.statust <- export_summs(GAD_student.status,scale = TRUE)
GAD_Multiplet <- export_summs(GAD_Multiple,scale = TRUE)
GAD_UGPGr <- filter(GAD_UGPGt, names == "R2")
GAD_n_ethnicityr <- filter(GAD_n_ethnicityt, names == "R2")
GAD_n_genderr <- filter(GAD_n_gendert, names == "R2")
GAD_n_disabilityr <- filter(GAD_n_disabilityt, names == "R2")
GAD_n_orientationr <- filter(GAD_n_orientationt, names == "R2")
GAD_n_yearr <- filter(GAD_n_yeart, names == "R2")
GAD_student.statusr <- filter(GAD_student.statust, names == "R2")
GAD_Multipler <- filter(GAD_Multiplet, names == "R2")
GAD_UGPGr <- GAD_UGPGr[,2]
GAD_n_ethnicityr <- GAD_n_ethnicityr[,2]
GAD_n_genderr <-GAD_n_genderr[,2]
GAD_n_disabilityr <- GAD_n_disabilityr[,2]
GAD_n_orientationr <- GAD_n_orientationr[,2]
GAD_n_yearr <- GAD_n_yearr[,2]
GAD_student.statusr <- GAD_student.statusr[,2]
GAD_Multipler <- GAD_Multipler[,2]
GAD_UGPGr$model <- "UGPG"
GAD_n_ethnicityr$model <- "ethnicity"
GAD_n_genderr$model <- "gender"
GAD_n_disabilityr$model <- "disability"
GAD_n_orientationr$model <- "orientation"
GAD_n_yearr$model <- "year"
GAD_student.statusr$model <- "student.status"
GAD_Multipler$model <- "Multiple"
rsquared_demo_GAD <- rbind(GAD_UGPGr, GAD_student.statusr,
GAD_n_ethnicityr, GAD_n_disabilityr, GAD_n_orientationr,
GAD_n_genderr,GAD_n_yearr)
colnames(rsquared_demo_GAD)<- c("rsquared", "model")
GAD_UGPGn <- filter(GAD_UGPGt, names == "N")
GAD_n_ethnicityn <- filter(GAD_n_ethnicityt, names == "N")
GAD_n_gendern <- filter(GAD_n_gendert, names == "N")
GAD_n_disabilityn <- filter(GAD_n_disabilityt, names == "N")
GAD_n_orientationn <- filter(GAD_n_orientationt, names == "N")
GAD_n_yearn <- filter(GAD_n_yeart, names == "N")
GAD_student.statusn <- filter(GAD_student.statust, names == "N")
GAD_Multiplen <- filter(GAD_Multiplet, names == "N")
GAD_UGPGn <- GAD_UGPGn[,2]
GAD_n_ethnicityn <- GAD_n_ethnicityn[,2]
GAD_n_gendern <-GAD_n_gendern[,2]
GAD_n_disabilityn <- GAD_n_disabilityn[,2]
GAD_n_orientationn <- GAD_n_orientationn[,2]
GAD_n_yearn <- GAD_n_yearn[,2]
GAD_student.statusn <- GAD_student.statusn[,2]
GAD_Multiplen <- GAD_Multiplen[,2]
GAD_UGPGn$model <- "UGPG"
GAD_n_ethnicityn$model <- "ethnicity"
GAD_n_gendern$model <- "gender"
GAD_n_disabilityn$model <- "disability"
GAD_n_orientationn$model <- "orientation"
GAD_n_yearn$model <- "year"
GAD_student.statusn$model <- "student.status"
GAD_Multiplen$model <- "Multiple"
n_demo_GAD <- rbind(GAD_UGPGn, GAD_student.statusn, GAD_n_disabilityn,
GAD_n_ethnicityn, GAD_n_orientationn,
GAD_n_gendern,GAD_n_yearn)
colnames(n_demo_GAD)<- c("n", "model")
GAD_UGPGcol <-tidy(GAD_UGPG) %>% mutate(model = "UGPG")
GAD_n_ethnicitycol <-tidy(GAD_n_ethnicity) %>% mutate(model = "ethnicity")
GAD_n_gendercol <-tidy(GAD_n_gender) %>% mutate(model = "gender")
GAD_n_disabilitycol <-tidy(GAD_n_disability) %>% mutate(model = "disability")
GAD_n_orientationcol <-tidy(GAD_n_orientation) %>% mutate(model = "orientation")
GAD_n_yearcol <-tidy(GAD_n_year) %>% mutate(model = "year")
GAD_student.statuscol <-tidy(GAD_student.status) %>% mutate(model = "student.status")
GAD_UGPGcol[GAD_UGPGcol == "(Intercept)"] <- "UGPG"
GAD_n_ethnicitycol[GAD_n_ethnicitycol == "(Intercept)"] <- "n_ethnicity"
GAD_n_gendercol[GAD_n_gendercol == "(Intercept)"] <- "n_gender"
GAD_n_disabilitycol[GAD_n_disabilitycol== "(Intercept)"] <- "n_disability"
GAD_n_orientationcol[GAD_n_orientationcol == "(Intercept)"] <- "n_orientation"
GAD_n_yearcol[GAD_n_yearcol == "(Intercept)"] <- "n_year"
GAD_student.statuscol[GAD_student.statuscol== "(Intercept)"] <- "student.status"
all_models_demo_GAD <- rbind(GAD_UGPGcol,
GAD_n_ethnicitycol,
GAD_n_gendercol,
GAD_n_disabilitycol,
GAD_n_orientationcol,
GAD_n_yearcol,
GAD_student.statuscol)
GAD_Multiple_col <- tidy(GAD_Multiple) %>% mutate(model = "Multiple")
finaltable1_GAD_demo <- right_join(all_models_demo_GAD, rsquared_demo_GAD)
## Joining with `by = join_by(model)`
finaltable1_GAD_demo <- right_join(n_demo_GAD, finaltable1_GAD_demo)
## Joining with `by = join_by(model)`
## Warning in right_join(n_demo_GAD, finaltable1_GAD_demo): Each row in `x` is expected to match at most 1 row in `y`.
## ℹ Row 1 of `x` matches multiple rows.
## ℹ If multiple matches are expected, set `multiple = "all"` to silence this
## warning.
finaltable1_GAD_demo <- as.data.frame(finaltable1_GAD_demo)
colnames(finaltable1_GAD_demo)<- c("N1","Model", "term", "beta1", "SE1", "t1", "p1",
"rsquared1")
finaltable1_GAD_demo$beta1 <- round(finaltable1_GAD_demo$beta1, digits = 2)
finaltable1_GAD_demo$rsquared1 <- as.numeric(finaltable1_GAD_demo$rsquared1)
finaltable1_GAD_demo$rsquared1 <- round(finaltable1_GAD_demo$rsquared1,
digits = 2)
finaltable1_GAD_demo$p1 <- as.numeric(finaltable1_GAD_demo$p1)
finaltable1_GAD_demo$p1 <- round(finaltable1_GAD_demo$p1, digits = 3)
finaltable1_GAD_demo <- finaltable1_GAD_demo[,c(3,1,4,8,7)]
finaltable1_GAD_demo$criterion1 <- "GAD"
final_table1_demo <- right_join(finaltable1_GAD_demo,finaltable1_PHQ_demo)
## Joining with `by = join_by(term)`
#when there is a variable without a number it is the intercept
colnames(GAD_Multipler)<- c("rsquared", "model")
colnames(GAD_Multiplen)<- c("n", "model")
finaltable1_GAD_Multiple <- right_join(GAD_Multiple_col, GAD_Multipler)
## Joining with `by = join_by(model)`
finaltable1_GAD_Multiple <- right_join(GAD_Multiplen, finaltable1_GAD_Multiple)
## Joining with `by = join_by(model)`
## Warning in right_join(GAD_Multiplen, finaltable1_GAD_Multiple): Each row in `x` is expected to match at most 1 row in `y`.
## ℹ Row 1 of `x` matches multiple rows.
## ℹ If multiple matches are expected, set `multiple = "all"` to silence this
## warning.
finaltable1_GAD_Multiple <- as.data.frame(finaltable1_GAD_Multiple)
colnames(finaltable1_GAD_Multiple)<- c("N1","Model", "term", "beta1", "SE1", "t1", "p1",
"rsquared1")
finaltable1_GAD_Multiple$beta1 <- round(finaltable1_GAD_Multiple$beta1, digits = 2)
finaltable1_GAD_Multiple$rsquared1 <- as.numeric(finaltable1_GAD_Multiple$rsquared1)
finaltable1_GAD_Multiple$rsquared1 <- round(finaltable1_GAD_Multiple$rsquared1, digits = 2)
finaltable1_GAD_Multiple$p1 <- round(finaltable1_GAD_Multiple$p1, digits = 3)
finaltable1_GAD_Multiple <- finaltable1_GAD_Multiple[,c(3,1,4,7,8)]
finaltable1_GAD_Multiple$criterion1 <- "GAD"
colnames(PHQ_Multipler)<- c("rsquared", "model")
colnames(PHQ_Multiplen)<- c("n", "model")
finaltable1_PHQ_Multiple <- right_join(PHQ_Multiple_col, PHQ_Multipler)
## Joining with `by = join_by(model)`
finaltable1_PHQ_Multiple <- right_join(PHQ_Multiplen, finaltable1_PHQ_Multiple)
## Joining with `by = join_by(model)`
## Warning in right_join(PHQ_Multiplen, finaltable1_PHQ_Multiple): Each row in `x` is expected to match at most 1 row in `y`.
## ℹ Row 1 of `x` matches multiple rows.
## ℹ If multiple matches are expected, set `multiple = "all"` to silence this
## warning.
finaltable1_PHQ_Multiple <- as.data.frame(finaltable1_PHQ_Multiple)
colnames(finaltable1_PHQ_Multiple)<- c("N","Model", "term", "beta", "SE", "t", "p",
"rsquared")
finaltable1_PHQ_Multiple$beta <- round(finaltable1_PHQ_Multiple$beta, digits = 2)
finaltable1_PHQ_Multiple$rsquared <- as.numeric(finaltable1_PHQ_Multiple$rsquared)
finaltable1_PHQ_Multiple$rsquared <- round(finaltable1_PHQ_Multiple$rsquared, digits = 2)
finaltable1_PHQ_Multiple$p <- round(finaltable1_PHQ_Multiple$p, digits = 3)
finaltable1_PHQ_Multiple <- finaltable1_PHQ_Multiple[,c(3,1,4,7,8)]
finaltable1_PHQ_Multiple$criterion <- "PHQ"
final_table1_demo_multiple <- right_join(finaltable1_GAD_Multiple,
finaltable1_PHQ_Multiple)
## Joining with `by = join_by(term)`
knitr::kable(final_table1_demo, "pipe", caption = "Simple Linear Regressions with Demographics")
| term | N1 | beta1 | rsquared1 | p1 | criterion1 | N | beta | rsquared | p | criterion |
|---|---|---|---|---|---|---|---|---|---|---|
| UGPG | 242 | 0.02 | 0.00 | 0.768 | GAD | 242 | 0.08 | 0.01 | 0.316 | PHQ |
| UGPG1 | 242 | -0.08 | 0.00 | 0.577 | GAD | 242 | -0.24 | 0.01 | 0.079 | PHQ |
| student.status | 242 | 0.08 | 0.01 | 0.404 | GAD | 242 | 0.12 | 0.02 | 0.185 | PHQ |
| student.status1 | 242 | -0.26 | 0.01 | 0.112 | GAD | 242 | -0.34 | 0.02 | 0.040 | PHQ |
| student.status2 | 242 | -0.08 | 0.01 | 0.609 | GAD | 242 | -0.18 | 0.02 | 0.235 | PHQ |
| n_disability | 230 | -0.18 | 0.10 | 0.009 | GAD | 230 | -0.21 | 0.13 | 0.002 | PHQ |
| n_disability1 | 230 | 0.86 | 0.10 | 0.000 | GAD | 230 | 0.95 | 0.13 | 0.000 | PHQ |
| n_ethnicity | 240 | 0.01 | 0.00 | 0.948 | GAD | 240 | 0.00 | 0.00 | 0.974 | PHQ |
| n_ethnicity1 | 240 | -0.03 | 0.00 | 0.840 | GAD | 240 | -0.02 | 0.00 | 0.907 | PHQ |
| n_orientation | 231 | -0.14 | 0.05 | 0.072 | GAD | 231 | -0.13 | 0.05 | 0.080 | PHQ |
| n_orientationSexual Minority | 231 | 0.49 | 0.05 | 0.001 | GAD | 231 | 0.49 | 0.05 | 0.001 | PHQ |
| n_gender | 242 | -0.12 | 0.00 | 0.535 | GAD | 242 | -0.07 | 0.02 | 0.706 | PHQ |
| n_gender1 | 242 | 0.40 | 0.00 | 0.415 | GAD | 242 | 0.91 | 0.02 | 0.062 | PHQ |
| n_gender2 | 242 | 0.12 | 0.00 | 0.541 | GAD | 242 | 0.06 | 0.02 | 0.777 | PHQ |
| n_year | 242 | 0.15 | 0.05 | 0.070 | GAD | 242 | 0.05 | 0.03 | 0.548 | PHQ |
| n_yearYear 2 | 242 | -0.23 | 0.05 | 0.204 | GAD | 242 | -0.12 | 0.03 | 0.507 | PHQ |
| n_yearYear 3 | 242 | -0.29 | 0.05 | 0.097 | GAD | 242 | 0.08 | 0.03 | 0.665 | PHQ |
| n_yearYear 4+ | 242 | -0.79 | 0.05 | 0.001 | GAD | 242 | -0.54 | 0.03 | 0.021 | PHQ |
knitr::kable(final_table1_demo_multiple, "pipe", caption = "Multiple Linear Regression with Demographics")
| term | N1 | beta1 | p1 | rsquared1 | criterion1 | N | beta | p | rsquared | criterion |
|---|---|---|---|---|---|---|---|---|---|---|
| (Intercept) | 217 | 0.42 | 0.308 | 0.2 | GAD | 217 | 0.65 | 0.113 | 0.2 | PHQ |
| n_disability1 | 217 | 0.77 | 0.000 | 0.2 | GAD | 217 | 0.85 | 0.000 | 0.2 | PHQ |
| student.status1 | 217 | -0.31 | 0.076 | 0.2 | GAD | 217 | -0.33 | 0.055 | 0.2 | PHQ |
| student.status2 | 217 | -0.06 | 0.725 | 0.2 | GAD | 217 | -0.15 | 0.394 | 0.2 | PHQ |
| n_orientationSexual Minority | 217 | 0.31 | 0.047 | 0.2 | GAD | 217 | 0.22 | 0.158 | 0.2 | PHQ |
| n_ethnicity1 | 217 | -0.03 | 0.861 | 0.2 | GAD | 217 | 0.08 | 0.579 | 0.2 | PHQ |
| n_gender1 | 217 | -0.38 | 0.477 | 0.2 | GAD | 217 | 0.22 | 0.681 | 0.2 | PHQ |
| n_gender2 | 217 | 0.11 | 0.585 | 0.2 | GAD | 217 | 0.04 | 0.849 | 0.2 | PHQ |
| UGPG1 | 217 | 0.04 | 0.835 | 0.2 | GAD | 217 | -0.03 | 0.861 | 0.2 | PHQ |
| n_yearYear 2 | 217 | -0.35 | 0.077 | 0.2 | GAD | 217 | -0.21 | 0.276 | 0.2 | PHQ |
| n_yearYear 3 | 217 | -0.39 | 0.040 | 0.2 | GAD | 217 | -0.01 | 0.970 | 0.2 | PHQ |
| n_yearYear 4+ | 217 | -0.71 | 0.004 | 0.2 | GAD | 217 | -0.35 | 0.161 | 0.2 | PHQ |
| age | 217 | -0.02 | 0.199 | 0.2 | GAD | 217 | -0.04 | 0.042 | 0.2 | PHQ |
###GAD lm####
GAD_PHQ <- lm(GADz~ PHQz, pass)
GAD_CUDIT <- lm(GADz~ CUDITz, pass)
GAD_AUDIT <- lm(GADz~ AUDITz, pass)
GAD_unil <- lm(GADz~ unil_z, pass)
GAD_prel <- lm(GADz~ prel_z, pass)
GAD_SA <- lm(GADz~ SAz, pass)
GAD_SCI <- lm(GADz~ SCInz, pass)
GAD_PS <- lm(GADz~ PSz, pass)
GAD_wellbeing <- lm(GADz~ wellbeingz, pass)
GAD_SC <- lm(GADz~ SCz, pass)
GAD_perfectionism <- lm(GADz~ perfectionismz, pass)
GAD_aca<- lm(GADz~SE_aca_z, pass)
GAD_fi<- lm(GADz~SE_fi_z, pass)
GAD_acc<- lm(GADz~SE_acc_z, pass)
GAD_fr<- lm(GADz~SE_fr_z, pass)
GAD_co<- lm(GADz~SE_co_z, pass)
GAD_PHQ1<- lm(GADz~ PHQz+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age, pass)
GAD_CUDIT1 <- lm(GADz~ CUDITz+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age, pass)
GAD_AUDIT1 <- lm(GADz~ AUDITz+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age, pass)
GAD_unil1 <- lm(GADz~ unil_z+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age, pass)
GAD_prel1 <- lm(GADz~ prel_z+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age, pass)
GAD_SA1 <- lm(GADz~ SAz+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age, pass)
GAD_SCI1 <- lm(GADz~ SCInz+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age, pass)
GAD_PS1 <- lm(GADz~ PSz+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age, pass)
GAD_wellbeing1 <- lm(GADz~ wellbeingz+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age, pass)
GAD_SC1 <- lm(GADz~ SCz+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age, pass)
GAD_perfectionism1 <- lm(GADz~ perfectionismz+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age, pass)
GAD_aca1<- lm(GADz~SE_aca_z+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age, pass)
GAD_fi1<- lm(GADz~SE_fi_z+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age, pass)
GAD_acc1<- lm(GADz~SE_acc_z+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age, pass)
GAD_fr1<- lm(GADz~SE_fr_z+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age, pass)
GAD_co1<- lm(GADz~SE_co_z+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age, pass)
GAD_PHQ2<- lm(GADz~ PHQz+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age+SE_fi_z, pass)
GAD_CUDIT2 <- lm(GADz~ CUDITz+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age+SE_fi_z, pass)
GAD_AUDIT2 <- lm(GADz~ AUDITz+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age+SE_fi_z, pass)
GAD_unil2 <- lm(GADz~ unil_z+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age+SE_fi_z, pass)
GAD_prel2 <- lm(GADz~ prel_z+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age+SE_fi_z, pass)
GAD_SA2 <- lm(GADz~ SAz+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age+SE_fi_z, pass)
GAD_SCI2 <- lm(GADz~ SCInz+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age+SE_fi_z, pass)
GAD_PS2 <- lm(GADz~ PSz+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age+SE_fi_z, pass)
GAD_wellbeing2 <- lm(GADz~ wellbeingz+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age+SE_fi_z, pass)
GAD_SC2 <- lm(GADz~ SCz+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age+SE_fi_z, pass)
GAD_perfectionism2 <- lm(GADz~ perfectionismz+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age+SE_fi_z, pass)
GAD_aca2<- lm(GADz~SE_aca_z+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age+SE_fi_z, pass)
GAD_acc2<- lm(GADz~SE_acc_z+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age+SE_fi_z, pass)
GAD_fr2<- lm(GADz~SE_fr_z+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age+SE_fi_z, pass)
GAD_co2<- lm(GADz~SE_co_z+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age+SE_fi_z, pass)
####PHQ lm####
PHQ_GAD <- lm(PHQz~ GADz, pass)
PHQ_CUDIT <- lm(PHQz~ CUDITz, pass)
PHQ_AUDIT <- lm(PHQz~ AUDITz, pass)
PHQ_unil <- lm(PHQz~ unil_z, pass)
PHQ_prel <- lm(PHQz~ prel_z, pass)
PHQ_SA <- lm(PHQz~ SAz, pass)
PHQ_SCI <- lm(PHQz~ SCInz, pass)
PHQ_PS <- lm(PHQz~ PSz, pass)
PHQ_wellbeing <- lm(PHQz~ wellbeingz, pass)
PHQ_SC <- lm(PHQz~ SCz, pass)
PHQ_perfectionism <- lm(PHQz~ perfectionismz, pass)
PHQ_aca<- lm(PHQz~SE_aca_z, pass)
PHQ_fi<- lm(PHQz~SE_fi_z, pass)
PHQ_acc<- lm(PHQz~SE_acc_z, pass)
PHQ_fr<- lm(PHQz~SE_fr_z, pass)
PHQ_co<- lm(PHQz~SE_co_z, pass)
PHQ_GAD1 <- lm(PHQz~ GADz+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age, pass)
PHQ_CUDIT1 <- lm(PHQz~ CUDITz+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age, pass)
PHQ_AUDIT1 <- lm(PHQz~ AUDITz+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age, pass)
PHQ_unil1 <- lm(PHQz~ unil_z+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age, pass)
PHQ_prel1 <- lm(PHQz~ prel_z+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age, pass)
PHQ_SA1 <- lm(PHQz~ SAz+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age, pass)
PHQ_SCI1 <- lm(PHQz~ SCInz+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age, pass)
PHQ_PS1 <- lm(PHQz~ PSz+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age, pass)
PHQ_wellbeing1 <- lm(PHQz~ wellbeingz+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age, pass)
PHQ_SC1 <- lm(PHQz~ SCz+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age, pass)
PHQ_perfectionism1 <- lm(PHQz~ perfectionismz+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age, pass)
PHQ_aca1<- lm(PHQz~SE_aca_z+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age, pass)
PHQ_fi1<- lm(PHQz~SE_fi_z+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age, pass)
PHQ_acc1<- lm(PHQz~SE_acc_z+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age, pass)
PHQ_fr1<- lm(PHQz~SE_fr_z+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age, pass)
PHQ_co1<- lm(PHQz~SE_co_z+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age, pass)
PHQ_GAD2 <- lm(PHQz~ GADz+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age+SE_fi_z, pass)
PHQ_CUDIT2 <- lm(PHQz~ CUDITz+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age+SE_fi_z, pass)
PHQ_AUDIT2 <- lm(PHQz~ AUDITz+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age+SE_fi_z, pass)
PHQ_unil2 <- lm(PHQz~ unil_z+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age+SE_fi_z, pass)
PHQ_prel2 <- lm(PHQz~ prel_z+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age+SE_fi_z, pass)
PHQ_SA2 <- lm(PHQz~ SAz+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age+SE_fi_z, pass)
PHQ_SCI2 <- lm(PHQz~ SCInz+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age+SE_fi_z, pass)
PHQ_PS2 <- lm(PHQz~ PSz+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age+SE_fi_z, pass)
PHQ_wellbeing2 <- lm(PHQz~ wellbeingz+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age+SE_fi_z, pass)
PHQ_SC2 <- lm(PHQz~ SCz+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age+SE_fi_z, pass)
PHQ_perfectionism2 <- lm(PHQz~ perfectionismz+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age+SE_fi_z, pass)
PHQ_aca2<- lm(PHQz~SE_aca_z+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age+SE_fi_z, pass)
PHQ_fi2<- lm(PHQz~SE_fi_z+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age+SE_fi_z, pass)
PHQ_acc2<- lm(PHQz~SE_acc_z+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age+SE_fi_z, pass)
PHQ_fr2<- lm(PHQz~SE_fr_z+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age+SE_fi_z, pass)
PHQ_co2<- lm(PHQz~SE_co_z+n_disability+student.status+
n_orientation+n_ethnicity+n_gender+
UGPG+n_year+age+SE_fi_z, pass)
#### summaries GAD####
summary(GAD_PHQ)
##
## Call:
## lm(formula = GADz ~ PHQz, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.88121 -0.38163 -0.09044 0.37534 1.88189
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.0003387 0.0406555 -0.008 0.993
## PHQz 0.7725357 0.0405401 19.056 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.6324 on 240 degrees of freedom
## Multiple R-squared: 0.6021, Adjusted R-squared: 0.6004
## F-statistic: 363.1 on 1 and 240 DF, p-value: < 2.2e-16
summary(GAD_CUDIT)
##
## Call:
## lm(formula = GADz ~ CUDITz, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.5099 -0.7852 -0.2571 0.6850 2.4850
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.01329 0.09204 0.144 0.885
## CUDITz 0.14045 0.09334 1.505 0.135
##
## Residual standard error: 0.9784 on 111 degrees of freedom
## (129 observations deleted due to missingness)
## Multiple R-squared: 0.01999, Adjusted R-squared: 0.01116
## F-statistic: 2.264 on 1 and 111 DF, p-value: 0.1353
summary(GAD_AUDIT)
##
## Call:
## lm(formula = GADz ~ AUDITz, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.3787 -0.7660 -0.2902 0.6572 2.4903
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.001762 0.064245 -0.027 0.978
## AUDITz 0.080502 0.064126 1.255 0.211
##
## Residual standard error: 0.9993 on 240 degrees of freedom
## Multiple R-squared: 0.006524, Adjusted R-squared: 0.002384
## F-statistic: 1.576 on 1 and 240 DF, p-value: 0.2106
summary(GAD_unil)
##
## Call:
## lm(formula = GADz ~ unil_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.7564 -0.6638 -0.1739 0.6029 2.6261
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.005845 0.058680 -0.100 0.921
## unil_z 0.420251 0.059717 7.037 2.04e-11 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9128 on 240 degrees of freedom
## Multiple R-squared: 0.1711, Adjusted R-squared: 0.1676
## F-statistic: 49.52 on 1 and 240 DF, p-value: 2.04e-11
summary(GAD_prel)
##
## Call:
## lm(formula = GADz ~ prel_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.4997 -0.6830 -0.2830 0.5839 2.9126
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.004185 0.059436 -0.070 0.944
## prel_z 0.391060 0.060202 6.496 4.72e-10 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9246 on 240 degrees of freedom
## Multiple R-squared: 0.1495, Adjusted R-squared: 0.146
## F-statistic: 42.19 on 1 and 240 DF, p-value: 4.719e-10
summary(GAD_SA)
##
## Call:
## lm(formula = GADz ~ SAz, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.8988 -0.5590 -0.1590 0.5292 2.3060
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.005643 0.053012 0.106 0.915
## SAz 0.558255 0.052099 10.715 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8246 on 240 degrees of freedom
## Multiple R-squared: 0.3236, Adjusted R-squared: 0.3208
## F-statistic: 114.8 on 1 and 240 DF, p-value: < 2.2e-16
summary(GAD_SCI)
##
## Call:
## lm(formula = GADz ~ SCInz, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.9242 -0.5794 -0.1526 0.5301 2.4207
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.02065 0.05231 -0.395 0.693
## SCInz 0.59055 0.05215 11.324 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8035 on 234 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.354, Adjusted R-squared: 0.3512
## F-statistic: 128.2 on 1 and 234 DF, p-value: < 2.2e-16
summary(GAD_PS)
##
## Call:
## lm(formula = GADz ~ PSz, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.83765 -0.45118 -0.05364 0.44882 2.07149
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.007869 0.047893 -0.164 0.87
## PSz 0.681897 0.047970 14.215 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.7389 on 236 degrees of freedom
## (4 observations deleted due to missingness)
## Multiple R-squared: 0.4613, Adjusted R-squared: 0.459
## F-statistic: 202.1 on 1 and 236 DF, p-value: < 2.2e-16
summary(GAD_wellbeing)
##
## Call:
## lm(formula = GADz ~ wellbeingz, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.47449 -0.51610 -0.07214 0.41494 2.40471
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.004709 0.047777 -0.099 0.922
## wellbeingz -0.684563 0.047905 -14.290 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.7371 on 236 degrees of freedom
## (4 observations deleted due to missingness)
## Multiple R-squared: 0.4639, Adjusted R-squared: 0.4616
## F-statistic: 204.2 on 1 and 236 DF, p-value: < 2.2e-16
summary(GAD_SC)
##
## Call:
## lm(formula = GADz ~ SCz, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.4399 -0.7899 -0.2735 0.6785 2.3928
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.003019 0.064111 -0.047 0.962
## SCz -0.102078 0.064049 -1.594 0.112
##
## Residual standard error: 0.9973 on 240 degrees of freedom
## Multiple R-squared: 0.01047, Adjusted R-squared: 0.00635
## F-statistic: 2.54 on 1 and 240 DF, p-value: 0.1123
summary(GAD_perfectionism)
##
## Call:
## lm(formula = GADz ~ perfectionismz, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.7272 -0.7078 -0.1744 0.6280 2.3789
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.01950 0.05941 -0.328 0.743
## perfectionismz 0.40607 0.05939 6.838 6.95e-11 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9127 on 234 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.1665, Adjusted R-squared: 0.163
## F-statistic: 46.75 on 1 and 234 DF, p-value: 6.949e-11
summary(GAD_aca)
##
## Call:
## lm(formula = GADz ~ SE_aca_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.6568 -0.7197 -0.1353 0.5864 2.4701
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.00258 0.05970 -0.043 0.966
## SE_aca_z -0.37835 0.06007 -6.299 1.42e-09 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9288 on 240 degrees of freedom
## Multiple R-squared: 0.1419, Adjusted R-squared: 0.1383
## F-statistic: 39.67 on 1 and 240 DF, p-value: 1.421e-09
summary(GAD_fi)
##
## Call:
## lm(formula = GADz ~ SE_fi_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.8313 -0.6978 -0.2498 0.6617 2.4699
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.001571 0.060218 -0.026 0.979
## SE_fi_z 0.355239 0.060120 5.909 1.17e-08 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9368 on 240 degrees of freedom
## Multiple R-squared: 0.127, Adjusted R-squared: 0.1234
## F-statistic: 34.91 on 1 and 240 DF, p-value: 1.174e-08
summary(GAD_acc)
##
## Call:
## lm(formula = GADz ~ SE_acc_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.6568 -0.7197 -0.1353 0.5864 2.4701
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.00258 0.05970 -0.043 0.966
## SE_acc_z -0.37835 0.06007 -6.299 1.42e-09 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9288 on 240 degrees of freedom
## Multiple R-squared: 0.1419, Adjusted R-squared: 0.1383
## F-statistic: 39.67 on 1 and 240 DF, p-value: 1.421e-09
summary(GAD_fr)
##
## Call:
## lm(formula = GADz ~ SE_fr_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.6588 -0.8128 -0.2560 0.7411 2.5673
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.004216 0.062961 -0.067 0.946663
## SE_fr_z -0.213570 0.062996 -3.390 0.000816 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9794 on 240 degrees of freedom
## Multiple R-squared: 0.0457, Adjusted R-squared: 0.04173
## F-statistic: 11.49 on 1 and 240 DF, p-value: 0.0008164
summary(GAD_co)
##
## Call:
## lm(formula = GADz ~ SE_co_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.4541 -0.7378 -0.2368 0.7252 2.5683
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.004029 0.063533 -0.063 0.949485
## SE_co_z -0.234682 0.063829 -3.677 0.000294 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9718 on 232 degrees of freedom
## (8 observations deleted due to missingness)
## Multiple R-squared: 0.05506, Adjusted R-squared: 0.05099
## F-statistic: 13.52 on 1 and 232 DF, p-value: 0.0002935
summary(GAD_PHQ1)
##
## Call:
## lm(formula = GADz ~ PHQz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.6373 -0.4369 -0.0781 0.3234 1.8507
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.062087 0.278991 -0.223 0.82412
## PHQz 0.741169 0.047598 15.571 < 2e-16 ***
## n_disability1 0.145640 0.135134 1.078 0.28243
## student.status1 -0.062110 0.118024 -0.526 0.59929
## student.status2 0.048002 0.117273 0.409 0.68274
## n_orientationSexual Minority 0.148096 0.105298 1.406 0.16112
## n_ethnicity1 -0.089363 0.103369 -0.864 0.38833
## n_gender1 -0.542061 0.361393 -1.500 0.13519
## n_gender2 0.082073 0.136743 0.600 0.54904
## UGPG1 0.058371 0.116840 0.500 0.61791
## n_yearYear 2 -0.191125 0.133622 -1.430 0.15416
## n_yearYear 3 -0.381503 0.126895 -3.006 0.00298 **
## n_yearYear 4+ -0.452291 0.167368 -2.702 0.00747 **
## age 0.003812 0.011800 0.323 0.74698
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.6335 on 203 degrees of freedom
## (25 observations deleted due to missingness)
## Multiple R-squared: 0.6358, Adjusted R-squared: 0.6124
## F-statistic: 27.26 on 13 and 203 DF, p-value: < 2.2e-16
summary(GAD_CUDIT1)
##
## Call:
## lm(formula = GADz ~ CUDITz + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.5938 -0.5578 -0.1419 0.4542 2.3902
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.3331328 0.6648602 -0.501 0.6176
## CUDITz 0.0861680 0.1023437 0.842 0.4021
## n_disability1 0.6545319 0.2506095 2.612 0.0106 *
## student.status1 -0.5408017 0.2347174 -2.304 0.0236 *
## student.status2 0.0417510 0.2642718 0.158 0.8748
## n_orientationSexual Minority 0.2684025 0.2103868 1.276 0.2054
## n_ethnicity1 0.0002369 0.2243371 0.001 0.9992
## n_gender1 1.1776510 1.0101448 1.166 0.2469
## n_gender2 0.3916857 0.2919485 1.342 0.1832
## UGPG1 0.0494372 0.2601301 0.190 0.8497
## n_yearYear 2 -0.2678335 0.2749213 -0.974 0.3326
## n_yearYear 3 -0.4626350 0.2786039 -1.661 0.1004
## n_yearYear 4+ -0.6078504 0.3482722 -1.745 0.0845 .
## age 0.0018698 0.0278513 0.067 0.9466
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9052 on 87 degrees of freedom
## (141 observations deleted due to missingness)
## Multiple R-squared: 0.2822, Adjusted R-squared: 0.175
## F-statistic: 2.632 on 13 and 87 DF, p-value: 0.003857
summary(GAD_AUDIT1)
##
## Call:
## lm(formula = GADz ~ AUDITz + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.7823 -0.6214 -0.1347 0.5685 2.4613
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.318337 0.412190 0.772 0.44083
## AUDITz 0.110235 0.065338 1.687 0.09311 .
## n_disability1 0.781297 0.189740 4.118 5.57e-05 ***
## student.status1 -0.301289 0.172107 -1.751 0.08153 .
## student.status2 -0.043440 0.172523 -0.252 0.80145
## n_orientationSexual Minority 0.291187 0.154545 1.884 0.06097 .
## n_ethnicity1 -0.009085 0.152307 -0.060 0.95249
## n_gender1 -0.400260 0.531551 -0.753 0.45232
## n_gender2 0.142690 0.202046 0.706 0.48086
## UGPG1 0.009722 0.172576 0.056 0.95513
## n_yearYear 2 -0.367162 0.196262 -1.871 0.06282 .
## n_yearYear 3 -0.415291 0.187443 -2.216 0.02783 *
## n_yearYear 4+ -0.730237 0.245378 -2.976 0.00328 **
## age -0.018440 0.017330 -1.064 0.28855
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.932 on 203 degrees of freedom
## (25 observations deleted due to missingness)
## Multiple R-squared: 0.2118, Adjusted R-squared: 0.1613
## F-statistic: 4.195 on 13 and 203 DF, p-value: 3.523e-06
summary(GAD_unil1)
##
## Call:
## lm(formula = GADz ~ unil_z + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.7452 -0.5870 -0.1324 0.4621 2.3642
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.33064 0.37489 0.882 0.378847
## unil_z 0.39570 0.06179 6.404 1.03e-09 ***
## n_disability1 0.62146 0.17587 3.534 0.000507 ***
## student.status1 -0.29100 0.15805 -1.841 0.067061 .
## student.status2 -0.12411 0.15848 -0.783 0.434460
## n_orientationSexual Minority 0.22510 0.14220 1.583 0.114974
## n_ethnicity1 -0.03400 0.13956 -0.244 0.807792
## n_gender1 -0.27685 0.48835 -0.567 0.571405
## n_gender2 0.23475 0.18576 1.264 0.207766
## UGPG1 0.10603 0.15823 0.670 0.503560
## n_yearYear 2 -0.36223 0.18003 -2.012 0.045528 *
## n_yearYear 3 -0.30860 0.17188 -1.795 0.074076 .
## n_yearYear 4+ -0.59123 0.22578 -2.619 0.009495 **
## age -0.02233 0.01578 -1.415 0.158591
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.856 on 203 degrees of freedom
## (25 observations deleted due to missingness)
## Multiple R-squared: 0.335, Adjusted R-squared: 0.2925
## F-statistic: 7.868 on 13 and 203 DF, p-value: 1.26e-12
summary(GAD_prel1)
##
## Call:
## lm(formula = GADz ~ prel_z + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.9478 -0.6332 -0.1516 0.4744 2.7261
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.42354 0.39036 1.085 0.27920
## prel_z 0.32944 0.07061 4.666 5.58e-06 ***
## n_disability1 0.58173 0.18619 3.124 0.00204 **
## student.status1 -0.27282 0.16483 -1.655 0.09944 .
## student.status2 -0.08145 0.16486 -0.494 0.62179
## n_orientationSexual Minority 0.14976 0.15146 0.989 0.32395
## n_ethnicity1 -0.09383 0.14612 -0.642 0.52150
## n_gender1 -0.61714 0.51109 -1.208 0.22864
## n_gender2 0.22522 0.19405 1.161 0.24716
## UGPG1 0.05461 0.16452 0.332 0.74028
## n_yearYear 2 -0.29216 0.18797 -1.554 0.12168
## n_yearYear 3 -0.29346 0.17975 -1.633 0.10411
## n_yearYear 4+ -0.57874 0.23611 -2.451 0.01509 *
## age -0.02383 0.01645 -1.449 0.14891
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8919 on 203 degrees of freedom
## (25 observations deleted due to missingness)
## Multiple R-squared: 0.2781, Adjusted R-squared: 0.2319
## F-statistic: 6.016 on 13 and 203 DF, p-value: 1.962e-09
summary(GAD_SA1)
##
## Call:
## lm(formula = GADz ~ SAz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.0116 -0.5341 -0.1172 0.4929 2.2654
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.058302 0.352501 0.165 0.868798
## SAz 0.504053 0.057649 8.743 8.61e-16 ***
## n_disability1 0.577400 0.164370 3.513 0.000546 ***
## student.status1 -0.173475 0.148474 -1.168 0.244019
## student.status2 -0.050801 0.147807 -0.344 0.731431
## n_orientationSexual Minority 0.074618 0.135008 0.553 0.581078
## n_ethnicity1 -0.036331 0.130417 -0.279 0.780853
## n_gender1 -0.440174 0.456148 -0.965 0.335704
## n_gender2 0.137681 0.172661 0.797 0.426147
## UGPG1 -0.015660 0.147627 -0.106 0.915628
## n_yearYear 2 -0.380055 0.168251 -2.259 0.024955 *
## n_yearYear 3 -0.202889 0.161586 -1.256 0.210701
## n_yearYear 4+ -0.418296 0.212889 -1.965 0.050796 .
## age -0.005225 0.014876 -0.351 0.725776
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.7999 on 203 degrees of freedom
## (25 observations deleted due to missingness)
## Multiple R-squared: 0.4194, Adjusted R-squared: 0.3822
## F-statistic: 11.28 on 13 and 203 DF, p-value: < 2.2e-16
summary(GAD_SCI1)
##
## Call:
## lm(formula = GADz ~ SCInz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.9883 -0.4826 -0.1459 0.4497 2.4909
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.08507 0.34289 0.248 0.80431
## SCInz 0.55051 0.05886 9.353 < 2e-16 ***
## n_disability1 0.46374 0.16329 2.840 0.00498 **
## student.status1 -0.19087 0.14610 -1.306 0.19292
## student.status2 0.03684 0.14598 0.252 0.80105
## n_orientationSexual Minority 0.14965 0.13139 1.139 0.25608
## n_ethnicity1 -0.04845 0.12815 -0.378 0.70579
## n_gender1 -0.18030 0.44323 -0.407 0.68461
## n_gender2 0.30873 0.16905 1.826 0.06931 .
## UGPG1 0.06624 0.14383 0.461 0.64563
## n_yearYear 2 -0.27225 0.16606 -1.639 0.10270
## n_yearYear 3 -0.28526 0.15631 -1.825 0.06951 .
## n_yearYear 4+ -0.54294 0.20506 -2.648 0.00876 **
## age -0.01454 0.01438 -1.011 0.31317
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.7762 on 198 degrees of freedom
## (30 observations deleted due to missingness)
## Multiple R-squared: 0.4496, Adjusted R-squared: 0.4134
## F-statistic: 12.44 on 13 and 198 DF, p-value: < 2.2e-16
summary(GAD_PS1)
##
## Call:
## lm(formula = GADz ~ PSz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.02602 -0.47539 -0.07708 0.38329 2.30079
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.189244 0.314393 0.602 0.54790
## PSz 0.660185 0.054769 12.054 < 2e-16 ***
## n_disability1 0.301669 0.151225 1.995 0.04742 *
## student.status1 -0.024779 0.134858 -0.184 0.85440
## student.status2 0.007760 0.132757 0.058 0.95345
## n_orientationSexual Minority 0.168852 0.119161 1.417 0.15804
## n_ethnicity1 -0.148914 0.117706 -1.265 0.20729
## n_gender1 -0.826069 0.409770 -2.016 0.04515 *
## n_gender2 0.093213 0.154485 0.603 0.54694
## UGPG1 0.080734 0.132310 0.610 0.54243
## n_yearYear 2 -0.216686 0.153308 -1.413 0.15909
## n_yearYear 3 -0.435242 0.143576 -3.031 0.00276 **
## n_yearYear 4+ -0.508501 0.188911 -2.692 0.00771 **
## age -0.007872 0.013258 -0.594 0.55333
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.7154 on 200 degrees of freedom
## (28 observations deleted due to missingness)
## Multiple R-squared: 0.5394, Adjusted R-squared: 0.5094
## F-statistic: 18.01 on 13 and 200 DF, p-value: < 2.2e-16
summary(GAD_wellbeing1)
##
## Call:
## lm(formula = GADz ~ wellbeingz + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.48007 -0.50586 -0.09251 0.46304 2.34722
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.286658 0.322270 -0.889 0.3748
## wellbeingz -0.636459 0.054071 -11.771 <2e-16 ***
## n_disability1 0.369275 0.151433 2.439 0.0156 *
## student.status1 0.033715 0.137155 0.246 0.8061
## student.status2 0.001111 0.134057 0.008 0.9934
## n_orientationSexual Minority 0.215882 0.120019 1.799 0.0736 .
## n_ethnicity1 -0.006985 0.118274 -0.059 0.9530
## n_gender1 -0.327677 0.412129 -0.795 0.4275
## n_gender2 0.255338 0.156538 1.631 0.1044
## UGPG1 0.010948 0.133557 0.082 0.9348
## n_yearYear 2 -0.334751 0.154175 -2.171 0.0311 *
## n_yearYear 3 -0.343674 0.145010 -2.370 0.0187 *
## n_yearYear 4+ -0.444043 0.191365 -2.320 0.0213 *
## age 0.003484 0.013507 0.258 0.7967
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.7225 on 200 degrees of freedom
## (28 observations deleted due to missingness)
## Multiple R-squared: 0.5302, Adjusted R-squared: 0.4996
## F-statistic: 17.36 on 13 and 200 DF, p-value: < 2.2e-16
summary(GAD_SC1)
##
## Call:
## lm(formula = GADz ~ SCz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.9119 -0.6703 -0.1281 0.5403 2.4950
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.39984 0.41002 0.975 0.33063
## SCz -0.06743 0.06411 -1.052 0.29414
## n_disability1 0.77149 0.19053 4.049 7.31e-05 ***
## student.status1 -0.30926 0.17279 -1.790 0.07498 .
## student.status2 -0.07413 0.17340 -0.428 0.66944
## n_orientationSexual Minority 0.29280 0.15566 1.881 0.06139 .
## n_ethnicity1 -0.03163 0.15267 -0.207 0.83606
## n_gender1 -0.36240 0.53394 -0.679 0.49809
## n_gender2 0.11469 0.20204 0.568 0.57089
## UGPG1 0.03571 0.17260 0.207 0.83628
## n_yearYear 2 -0.34900 0.19683 -1.773 0.07771 .
## n_yearYear 3 -0.38294 0.18750 -2.042 0.04241 *
## n_yearYear 4+ -0.69899 0.24621 -2.839 0.00499 **
## age -0.02111 0.01729 -1.221 0.22353
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9359 on 203 degrees of freedom
## (25 observations deleted due to missingness)
## Multiple R-squared: 0.205, Adjusted R-squared: 0.1541
## F-statistic: 4.027 on 13 and 203 DF, p-value: 7.051e-06
summary(GAD_perfectionism1)
##
## Call:
## lm(formula = GADz ~ perfectionismz + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.7150 -0.6102 -0.1922 0.5538 2.4532
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.16621 0.37974 0.438 0.662082
## perfectionismz 0.36027 0.06077 5.928 1.34e-08 ***
## n_disability1 0.60634 0.17935 3.381 0.000871 ***
## student.status1 -0.31490 0.16083 -1.958 0.051644 .
## student.status2 -0.03538 0.16119 -0.219 0.826514
## n_orientationSexual Minority 0.21175 0.14503 1.460 0.145849
## n_ethnicity1 -0.02405 0.14175 -0.170 0.865438
## n_gender1 -0.08439 0.49231 -0.171 0.864070
## n_gender2 0.19172 0.18608 1.030 0.304119
## UGPG1 0.09025 0.15928 0.567 0.571625
## n_yearYear 2 -0.36529 0.18332 -1.993 0.047678 *
## n_yearYear 3 -0.30202 0.17306 -1.745 0.082498 .
## n_yearYear 4+ -0.59767 0.22675 -2.636 0.009059 **
## age -0.01473 0.01594 -0.924 0.356593
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.859 on 198 degrees of freedom
## (30 observations deleted due to missingness)
## Multiple R-squared: 0.326, Adjusted R-squared: 0.2817
## F-statistic: 7.367 on 13 and 198 DF, p-value: 1.012e-11
summary(GAD_aca1)
##
## Call:
## lm(formula = GADz ~ SE_aca_z + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.2177 -0.6026 -0.1280 0.5096 2.4592
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.205578 0.377403 0.545 0.58654
## SE_aca_z -0.423369 0.067436 -6.278 2.04e-09 ***
## n_disability1 0.563157 0.178027 3.163 0.00180 **
## student.status1 -0.242980 0.158891 -1.529 0.12777
## student.status2 -0.116708 0.158939 -0.734 0.46361
## n_orientationSexual Minority 0.297639 0.142058 2.095 0.03739 *
## n_ethnicity1 -0.328817 0.148058 -2.221 0.02747 *
## n_gender1 -0.292910 0.489894 -0.598 0.55057
## n_gender2 0.226724 0.186273 1.217 0.22496
## UGPG1 0.112643 0.158844 0.709 0.47905
## n_yearYear 2 -0.388824 0.180715 -2.152 0.03261 *
## n_yearYear 3 -0.455061 0.172361 -2.640 0.00893 **
## n_yearYear 4+ -0.685672 0.225815 -3.036 0.00271 **
## age -0.009794 0.015958 -0.614 0.54008
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8588 on 203 degrees of freedom
## (25 observations deleted due to missingness)
## Multiple R-squared: 0.3307, Adjusted R-squared: 0.2878
## F-statistic: 7.714 on 13 and 203 DF, p-value: 2.291e-12
summary(GAD_fi1)
##
## Call:
## lm(formula = GADz ~ SE_fi_z + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.9220 -0.6448 -0.1841 0.5871 2.4644
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.39026 0.39361 0.991 0.322625
## SE_fi_z 0.27311 0.06415 4.257 3.16e-05 ***
## n_disability1 0.72108 0.18346 3.930 0.000116 ***
## student.status1 -0.26719 0.16629 -1.607 0.109658
## student.status2 -0.08126 0.16622 -0.489 0.625457
## n_orientationSexual Minority 0.23042 0.14989 1.537 0.125786
## n_ethnicity1 -0.01556 0.14663 -0.106 0.915606
## n_gender1 -0.25896 0.51352 -0.504 0.614601
## n_gender2 0.21752 0.19569 1.112 0.267649
## UGPG1 0.15799 0.16828 0.939 0.348926
## n_yearYear 2 -0.34324 0.18911 -1.815 0.070997 .
## n_yearYear 3 -0.29218 0.18147 -1.610 0.108932
## n_yearYear 4+ -0.56042 0.23893 -2.346 0.019966 *
## age -0.02722 0.01662 -1.637 0.103087
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8992 on 203 degrees of freedom
## (25 observations deleted due to missingness)
## Multiple R-squared: 0.2662, Adjusted R-squared: 0.2192
## F-statistic: 5.665 on 13 and 203 DF, p-value: 8.174e-09
summary(GAD_acc1)
##
## Call:
## lm(formula = GADz ~ SE_acc_z + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.2177 -0.6026 -0.1280 0.5096 2.4592
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.205578 0.377403 0.545 0.58654
## SE_acc_z -0.423369 0.067436 -6.278 2.04e-09 ***
## n_disability1 0.563157 0.178027 3.163 0.00180 **
## student.status1 -0.242980 0.158891 -1.529 0.12777
## student.status2 -0.116708 0.158939 -0.734 0.46361
## n_orientationSexual Minority 0.297639 0.142058 2.095 0.03739 *
## n_ethnicity1 -0.328817 0.148058 -2.221 0.02747 *
## n_gender1 -0.292910 0.489894 -0.598 0.55057
## n_gender2 0.226724 0.186273 1.217 0.22496
## UGPG1 0.112643 0.158844 0.709 0.47905
## n_yearYear 2 -0.388824 0.180715 -2.152 0.03261 *
## n_yearYear 3 -0.455061 0.172361 -2.640 0.00893 **
## n_yearYear 4+ -0.685672 0.225815 -3.036 0.00271 **
## age -0.009794 0.015958 -0.614 0.54008
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8588 on 203 degrees of freedom
## (25 observations deleted due to missingness)
## Multiple R-squared: 0.3307, Adjusted R-squared: 0.2878
## F-statistic: 7.714 on 13 and 203 DF, p-value: 2.291e-12
summary(GAD_fr1)
##
## Call:
## lm(formula = GADz ~ SE_fr_z + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.7856 -0.6681 -0.1259 0.5154 2.6518
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.26100 0.39769 0.656 0.512378
## SE_fr_z -0.25159 0.06344 -3.966 0.000101 ***
## n_disability1 0.80588 0.18420 4.375 1.94e-05 ***
## student.status1 -0.36266 0.16748 -2.165 0.031527 *
## student.status2 -0.14095 0.16828 -0.838 0.403241
## n_orientationSexual Minority 0.25185 0.15025 1.676 0.095245 .
## n_ethnicity1 -0.02650 0.14741 -0.180 0.857523
## n_gender1 -0.30520 0.51588 -0.592 0.554767
## n_gender2 0.21673 0.19696 1.100 0.272474
## UGPG1 -0.01436 0.16721 -0.086 0.931654
## n_yearYear 2 -0.36669 0.19018 -1.928 0.055239 .
## n_yearYear 3 -0.34967 0.18133 -1.928 0.055206 .
## n_yearYear 4+ -0.61414 0.23887 -2.571 0.010857 *
## age -0.01725 0.01672 -1.032 0.303283
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9041 on 203 degrees of freedom
## (25 observations deleted due to missingness)
## Multiple R-squared: 0.2582, Adjusted R-squared: 0.2107
## F-statistic: 5.434 on 13 and 203 DF, p-value: 2.104e-08
summary(GAD_co1)
##
## Call:
## lm(formula = GADz ~ SE_co_z + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.7810 -0.6445 -0.1567 0.5826 2.5974
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.562149 0.404424 1.390 0.16611
## SE_co_z -0.219827 0.067972 -3.234 0.00143 **
## n_disability1 0.788278 0.192184 4.102 6.02e-05 ***
## student.status1 -0.185845 0.173375 -1.072 0.28508
## student.status2 -0.002696 0.177510 -0.015 0.98790
## n_orientationSexual Minority 0.244516 0.155168 1.576 0.11669
## n_ethnicity1 -0.009500 0.152633 -0.062 0.95044
## n_gender1 -0.465235 0.522463 -0.890 0.37431
## n_gender2 0.124265 0.200871 0.619 0.53688
## UGPG1 -0.021473 0.170189 -0.126 0.89973
## n_yearYear 2 -0.298962 0.192421 -1.554 0.12188
## n_yearYear 3 -0.351289 0.192908 -1.821 0.07014 .
## n_yearYear 4+ -0.591471 0.241655 -2.448 0.01527 *
## age -0.030940 0.016993 -1.821 0.07017 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9106 on 195 degrees of freedom
## (33 observations deleted due to missingness)
## Multiple R-squared: 0.2452, Adjusted R-squared: 0.1949
## F-statistic: 4.874 on 13 and 195 DF, p-value: 2.325e-07
summary(GAD_PHQ2)
##
## Call:
## lm(formula = GADz ~ PHQz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age + SE_fi_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.59261 -0.43057 -0.09267 0.32982 1.88427
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.057924 0.279480 -0.207 0.83602
## PHQz 0.729875 0.050884 14.344 < 2e-16 ***
## n_disability1 0.149203 0.135450 1.102 0.27197
## student.status1 -0.061263 0.118205 -0.518 0.60483
## student.status2 0.044063 0.117610 0.375 0.70831
## n_orientationSexual Minority 0.141638 0.105944 1.337 0.18275
## n_ethnicity1 -0.087157 0.103580 -0.841 0.40110
## n_gender1 -0.525996 0.362811 -1.450 0.14867
## n_gender2 0.094520 0.138343 0.683 0.49525
## UGPG1 0.071715 0.118887 0.603 0.54704
## n_yearYear 2 -0.192796 0.133845 -1.440 0.15129
## n_yearYear 3 -0.370980 0.128159 -2.895 0.00421 **
## n_yearYear 4+ -0.439623 0.168800 -2.604 0.00989 **
## age 0.002856 0.011913 0.240 0.81080
## SE_fi_z 0.030654 0.048315 0.634 0.52650
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.6345 on 202 degrees of freedom
## (25 observations deleted due to missingness)
## Multiple R-squared: 0.6365, Adjusted R-squared: 0.6113
## F-statistic: 25.26 on 14 and 202 DF, p-value: < 2.2e-16
summary(GAD_CUDIT2)
##
## Call:
## lm(formula = GADz ~ CUDITz + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age + SE_fi_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.5465 -0.5419 -0.1571 0.4518 2.0349
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.376827 0.586265 -0.643 0.5221
## CUDITz 0.147781 0.091044 1.623 0.1082
## n_disability1 0.579415 0.221453 2.616 0.0105 *
## student.status1 -0.454210 0.207646 -2.187 0.0314 *
## student.status2 0.091761 0.233213 0.393 0.6950
## n_orientationSexual Minority 0.097669 0.188504 0.518 0.6057
## n_ethnicity1 0.082860 0.198461 0.418 0.6773
## n_gender1 1.634941 0.895155 1.826 0.0713 .
## n_gender2 0.588013 0.260282 2.259 0.0264 *
## UGPG1 0.464066 0.243388 1.907 0.0599 .
## n_yearYear 2 -0.157400 0.243365 -0.647 0.5195
## n_yearYear 3 -0.252540 0.249086 -1.014 0.3135
## n_yearYear 4+ -0.001221 0.329381 -0.004 0.9971
## age -0.017531 0.024850 -0.705 0.4824
## SE_fi_z 0.434126 0.085280 5.091 2.08e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.7981 on 86 degrees of freedom
## (141 observations deleted due to missingness)
## Multiple R-squared: 0.4484, Adjusted R-squared: 0.3586
## F-statistic: 4.994 on 14 and 86 DF, p-value: 1.05e-06
summary(GAD_AUDIT2)
##
## Call:
## lm(formula = GADz ~ AUDITz + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age + SE_fi_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.9292 -0.6204 -0.1644 0.5039 2.4298
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.3031662 0.3963907 0.765 0.4453
## AUDITz 0.0965253 0.0629163 1.534 0.1265
## n_disability1 0.7278195 0.1829063 3.979 9.64e-05 ***
## student.status1 -0.2619633 0.1657700 -1.580 0.1156
## student.status2 -0.0655438 0.1659874 -0.395 0.6934
## n_orientationSexual Minority 0.2155034 0.1497114 1.439 0.1516
## n_ethnicity1 -0.0003388 0.1464783 -0.002 0.9982
## n_gender1 -0.2788774 0.5119777 -0.545 0.5866
## n_gender2 0.2437188 0.1957868 1.245 0.2146
## UGPG1 0.1326279 0.1685319 0.787 0.4322
## n_yearYear 2 -0.3584669 0.1887427 -1.899 0.0590 .
## n_yearYear 3 -0.3190448 0.1817110 -1.756 0.0806 .
## n_yearYear 4+ -0.5826551 0.2385820 -2.442 0.0155 *
## age -0.0238049 0.0167142 -1.424 0.1559
## SE_fi_z 0.2679927 0.0640210 4.186 4.24e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8962 on 202 degrees of freedom
## (25 observations deleted due to missingness)
## Multiple R-squared: 0.2747, Adjusted R-squared: 0.2244
## F-statistic: 5.464 on 14 and 202 DF, p-value: 7.498e-09
summary(GAD_unil2)
##
## Call:
## lm(formula = GADz ~ unil_z + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age + SE_fi_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.6764 -0.5683 -0.1058 0.4843 2.4818
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.31394 0.36316 0.864 0.388354
## unil_z 0.36594 0.06036 6.062 6.48e-09 ***
## n_disability1 0.58857 0.17058 3.450 0.000681 ***
## student.status1 -0.25840 0.15334 -1.685 0.093503 .
## student.status2 -0.13617 0.15354 -0.887 0.376218
## n_orientationSexual Minority 0.16567 0.13863 1.195 0.233443
## n_ethnicity1 -0.02422 0.13521 -0.179 0.858002
## n_gender1 -0.18435 0.47367 -0.389 0.697547
## n_gender2 0.31400 0.18114 1.733 0.084544 .
## UGPG1 0.20167 0.15533 1.298 0.195659
## n_yearYear 2 -0.35578 0.17439 -2.040 0.042633 *
## n_yearYear 3 -0.23629 0.16758 -1.410 0.160073
## n_yearYear 4+ -0.47786 0.22074 -2.165 0.031573 *
## age -0.02645 0.01533 -1.726 0.085885 .
## SE_fi_z 0.22605 0.05966 3.789 0.000199 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8291 on 202 degrees of freedom
## (25 observations deleted due to missingness)
## Multiple R-squared: 0.3792, Adjusted R-squared: 0.3361
## F-statistic: 8.812 on 14 and 202 DF, p-value: 7.296e-15
summary(GAD_prel2)
##
## Call:
## lm(formula = GADz ~ prel_z + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age + SE_fi_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.1053 -0.5867 -0.2036 0.5197 2.4036
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.39490 0.37240 1.060 0.29023
## prel_z 0.33534 0.06737 4.978 1.37e-06 ***
## n_disability1 0.52348 0.17806 2.940 0.00367 **
## student.status1 -0.23038 0.15750 -1.463 0.14510
## student.status2 -0.10255 0.15732 -0.652 0.51524
## n_orientationSexual Minority 0.06571 0.14563 0.451 0.65232
## n_ethnicity1 -0.08365 0.13940 -0.600 0.54911
## n_gender1 -0.49769 0.48821 -1.019 0.30923
## n_gender2 0.33657 0.18668 1.803 0.07289 .
## UGPG1 0.17943 0.15927 1.127 0.26127
## n_yearYear 2 -0.28431 0.17931 -1.586 0.11440
## n_yearYear 3 -0.19535 0.17279 -1.131 0.25957
## n_yearYear 4+ -0.42574 0.22767 -1.870 0.06294 .
## age -0.02895 0.01573 -1.841 0.06714 .
## SE_fi_z 0.27887 0.06070 4.594 7.64e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8507 on 202 degrees of freedom
## (25 observations deleted due to missingness)
## Multiple R-squared: 0.3464, Adjusted R-squared: 0.3011
## F-statistic: 7.647 on 14 and 202 DF, p-value: 7.784e-13
summary(GAD_SA2)
##
## Call:
## lm(formula = GADz ~ SAz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age + SE_fi_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.93479 -0.51064 -0.09116 0.50449 2.48198
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.061128 0.343106 0.178 0.858774
## SAz 0.471655 0.056870 8.294 1.53e-14 ***
## n_disability1 0.551336 0.160162 3.442 0.000701 ***
## student.status1 -0.152570 0.144639 -1.055 0.292763
## student.status2 -0.066113 0.143933 -0.459 0.646488
## n_orientationSexual Minority 0.032343 0.131962 0.245 0.806636
## n_ethnicity1 -0.027665 0.126965 -0.218 0.827732
## n_gender1 -0.348848 0.444755 -0.784 0.433748
## n_gender2 0.213214 0.169437 1.258 0.209711
## UGPG1 0.075684 0.146039 0.518 0.604853
## n_yearYear 2 -0.373299 0.163778 -2.279 0.023694 *
## n_yearYear 3 -0.146507 0.158100 -0.927 0.355204
## n_yearYear 4+ -0.330365 0.208730 -1.583 0.115045
## age -0.009918 0.014541 -0.682 0.495976
## SE_fi_z 0.197180 0.056290 3.503 0.000567 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.7786 on 202 degrees of freedom
## (25 observations deleted due to missingness)
## Multiple R-squared: 0.4526, Adjusted R-squared: 0.4147
## F-statistic: 11.93 on 14 and 202 DF, p-value: < 2.2e-16
summary(GAD_SCI2)
##
## Call:
## lm(formula = GADz ~ SCInz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age + SE_fi_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.0479 -0.4868 -0.1691 0.5064 2.3949
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.08881 0.33922 0.262 0.79375
## SCInz 0.51257 0.06051 8.470 5.62e-15 ***
## n_disability1 0.46288 0.16155 2.865 0.00462 **
## student.status1 -0.17688 0.14466 -1.223 0.22289
## student.status2 0.01127 0.14484 0.078 0.93804
## n_orientationSexual Minority 0.11677 0.13076 0.893 0.37296
## n_ethnicity1 -0.03836 0.12685 -0.302 0.76265
## n_gender1 -0.13685 0.43889 -0.312 0.75552
## n_gender2 0.34680 0.16805 2.064 0.04036 *
## UGPG1 0.12751 0.14475 0.881 0.37947
## n_yearYear 2 -0.27336 0.16428 -1.664 0.09772 .
## n_yearYear 3 -0.24270 0.15573 -1.558 0.12073
## n_yearYear 4+ -0.47915 0.20474 -2.340 0.02027 *
## age -0.01737 0.01428 -1.217 0.22512
## SE_fi_z 0.13324 0.05782 2.304 0.02224 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.7679 on 197 degrees of freedom
## (30 observations deleted due to missingness)
## Multiple R-squared: 0.464, Adjusted R-squared: 0.4259
## F-statistic: 12.18 on 14 and 197 DF, p-value: < 2.2e-16
summary(GAD_PS2)
##
## Call:
## lm(formula = GADz ~ PSz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age + SE_fi_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.1867 -0.4492 -0.1101 0.3478 2.2327
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.187779 0.312312 0.601 0.54835
## PSz 0.629615 0.056695 11.105 < 2e-16 ***
## n_disability1 0.303592 0.150227 2.021 0.04463 *
## student.status1 -0.021404 0.133976 -0.160 0.87324
## student.status2 -0.005262 0.132053 -0.040 0.96825
## n_orientationSexual Minority 0.146171 0.118962 1.229 0.22063
## n_ethnicity1 -0.140169 0.117015 -1.198 0.23239
## n_gender1 -0.761778 0.408436 -1.865 0.06364 .
## n_gender2 0.133775 0.154913 0.864 0.38887
## UGPG1 0.125505 0.133492 0.940 0.34827
## n_yearYear 2 -0.219829 0.152302 -1.443 0.15049
## n_yearYear 3 -0.396849 0.144024 -2.755 0.00641 **
## n_yearYear 4+ -0.462270 0.189203 -2.443 0.01543 *
## age -0.010346 0.013233 -0.782 0.43526
## SE_fi_z 0.102170 0.053292 1.917 0.05665 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.7107 on 199 degrees of freedom
## (28 observations deleted due to missingness)
## Multiple R-squared: 0.5477, Adjusted R-squared: 0.5159
## F-statistic: 17.21 on 14 and 199 DF, p-value: < 2.2e-16
summary(GAD_wellbeing2)
##
## Call:
## lm(formula = GADz ~ wellbeingz + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age + SE_fi_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.66010 -0.51977 -0.09716 0.42298 2.22061
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.2652412 0.3205988 -0.827 0.4090
## wellbeingz -0.6065122 0.0561837 -10.795 <2e-16 ***
## n_disability1 0.3690117 0.1505479 2.451 0.0151 *
## student.status1 0.0336561 0.1363530 0.247 0.8053
## student.status2 -0.0113196 0.1334458 -0.085 0.9325
## n_orientationSexual Minority 0.1920036 0.1200263 1.600 0.1113
## n_ethnicity1 -0.0048784 0.1175884 -0.041 0.9669
## n_gender1 -0.2878429 0.4102965 -0.702 0.4838
## n_gender2 0.2870425 0.1565817 1.833 0.0683 .
## UGPG1 0.0575029 0.1351848 0.425 0.6710
## n_yearYear 2 -0.3326370 0.1532777 -2.170 0.0312 *
## n_yearYear 3 -0.3106824 0.1452818 -2.138 0.0337 *
## n_yearYear 4+ -0.4027059 0.1915792 -2.102 0.0368 *
## age 0.0005229 0.0135251 0.039 0.9692
## SE_fi_z 0.0990102 0.0540240 1.833 0.0683 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.7183 on 199 degrees of freedom
## (28 observations deleted due to missingness)
## Multiple R-squared: 0.538, Adjusted R-squared: 0.5055
## F-statistic: 16.55 on 14 and 199 DF, p-value: < 2.2e-16
summary(GAD_SC2)
##
## Call:
## lm(formula = GADz ~ SCz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age + SE_fi_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.9551 -0.6347 -0.1874 0.5751 2.4798
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.38601 0.39484 0.978 0.329428
## SCz -0.01674 0.06296 -0.266 0.790600
## n_disability1 0.72094 0.18388 3.921 0.000121 ***
## student.status1 -0.26798 0.16670 -1.608 0.109487
## student.status2 -0.08428 0.16699 -0.505 0.614322
## n_orientationSexual Minority 0.22717 0.15074 1.507 0.133358
## n_ethnicity1 -0.01692 0.14705 -0.115 0.908511
## n_gender1 -0.25608 0.51481 -0.497 0.619427
## n_gender2 0.21723 0.19614 1.107 0.269401
## UGPG1 0.15637 0.16877 0.927 0.355277
## n_yearYear 2 -0.34309 0.18954 -1.810 0.071767 .
## n_yearYear 3 -0.29244 0.18189 -1.608 0.109435
## n_yearYear 4+ -0.56003 0.23949 -2.338 0.020342 *
## age -0.02688 0.01671 -1.609 0.109281
## SE_fi_z 0.26969 0.06556 4.114 5.67e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9013 on 202 degrees of freedom
## (25 observations deleted due to missingness)
## Multiple R-squared: 0.2665, Adjusted R-squared: 0.2156
## F-statistic: 5.242 on 14 and 202 DF, p-value: 1.959e-08
summary(GAD_perfectionism2)
##
## Call:
## lm(formula = GADz ~ perfectionismz + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age + SE_fi_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.5630 -0.6260 -0.1823 0.5574 2.3054
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.16073 0.37003 0.434 0.664494
## perfectionismz 0.32503 0.06012 5.406 1.85e-07 ***
## n_disability1 0.58739 0.17485 3.359 0.000938 ***
## student.status1 -0.27938 0.15707 -1.779 0.076833 .
## student.status2 -0.06743 0.15735 -0.429 0.668720
## n_orientationSexual Minority 0.15295 0.14238 1.074 0.284025
## n_ethnicity1 -0.01116 0.13817 -0.081 0.935734
## n_gender1 -0.02364 0.48006 -0.049 0.960776
## n_gender2 0.26501 0.18260 1.451 0.148282
## UGPG1 0.18419 0.15766 1.168 0.244104
## n_yearYear 2 -0.35680 0.17865 -1.997 0.047184 *
## n_yearYear 3 -0.23272 0.16986 -1.370 0.172215
## n_yearYear 4+ -0.49081 0.22318 -2.199 0.029031 *
## age -0.01907 0.01558 -1.224 0.222474
## SE_fi_z 0.20906 0.06157 3.396 0.000828 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.837 on 197 degrees of freedom
## (30 observations deleted due to missingness)
## Multiple R-squared: 0.3633, Adjusted R-squared: 0.318
## F-statistic: 8.028 on 14 and 197 DF, p-value: 1.963e-13
summary(GAD_aca2)
##
## Call:
## lm(formula = GADz ~ SE_aca_z + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age + SE_fi_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.2584 -0.5796 -0.1589 0.5452 2.3255
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.21496 0.37093 0.580 0.56289
## SE_aca_z -0.36797 0.06906 -5.329 2.63e-07 ***
## n_disability1 0.55562 0.17499 3.175 0.00173 **
## student.status1 -0.22464 0.15629 -1.437 0.15219
## student.status2 -0.12274 0.15622 -0.786 0.43298
## n_orientationSexual Minority 0.24707 0.14073 1.756 0.08067 .
## n_ethnicity1 -0.28197 0.14643 -1.926 0.05556 .
## n_gender1 -0.22482 0.48206 -0.466 0.64146
## n_gender2 0.28176 0.18408 1.531 0.12743
## UGPG1 0.18263 0.15802 1.156 0.24917
## n_yearYear 2 -0.37935 0.17764 -2.136 0.03392 *
## n_yearYear 3 -0.38412 0.17121 -2.244 0.02594 *
## n_yearYear 4+ -0.59174 0.22436 -2.638 0.00900 **
## age -0.01469 0.01578 -0.931 0.35280
## SE_fi_z 0.17923 0.06274 2.857 0.00473 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.844 on 202 degrees of freedom
## (25 observations deleted due to missingness)
## Multiple R-squared: 0.3567, Adjusted R-squared: 0.3121
## F-statistic: 7.999 on 14 and 202 DF, p-value: 1.868e-13
summary(GAD_acc2)
##
## Call:
## lm(formula = GADz ~ SE_acc_z + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age + SE_fi_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.2584 -0.5796 -0.1589 0.5452 2.3255
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.21496 0.37093 0.580 0.56289
## SE_acc_z -0.36797 0.06906 -5.329 2.63e-07 ***
## n_disability1 0.55562 0.17499 3.175 0.00173 **
## student.status1 -0.22464 0.15629 -1.437 0.15219
## student.status2 -0.12274 0.15622 -0.786 0.43298
## n_orientationSexual Minority 0.24707 0.14073 1.756 0.08067 .
## n_ethnicity1 -0.28197 0.14643 -1.926 0.05556 .
## n_gender1 -0.22482 0.48206 -0.466 0.64146
## n_gender2 0.28176 0.18408 1.531 0.12743
## UGPG1 0.18263 0.15802 1.156 0.24917
## n_yearYear 2 -0.37935 0.17764 -2.136 0.03392 *
## n_yearYear 3 -0.38412 0.17121 -2.244 0.02594 *
## n_yearYear 4+ -0.59174 0.22436 -2.638 0.00900 **
## age -0.01469 0.01578 -0.931 0.35280
## SE_fi_z 0.17923 0.06274 2.857 0.00473 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.844 on 202 degrees of freedom
## (25 observations deleted due to missingness)
## Multiple R-squared: 0.3567, Adjusted R-squared: 0.3121
## F-statistic: 7.999 on 14 and 202 DF, p-value: 1.868e-13
summary(GAD_fr2)
##
## Call:
## lm(formula = GADz ~ SE_fr_z + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age + SE_fi_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.7184 -0.5923 -0.1415 0.5432 2.4337
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.24121 0.38217 0.631 0.528646
## SE_fr_z -0.24004 0.06102 -3.934 0.000115 ***
## n_disability1 0.75293 0.17744 4.243 3.35e-05 ***
## student.status1 -0.32085 0.16124 -1.990 0.047946 *
## student.status2 -0.15677 0.16174 -0.969 0.333569
## n_orientationSexual Minority 0.17819 0.14543 1.225 0.221878
## n_ethnicity1 -0.01581 0.14167 -0.112 0.911270
## n_gender1 -0.19234 0.49642 -0.387 0.698825
## n_gender2 0.31461 0.19067 1.650 0.100495
## UGPG1 0.10499 0.16314 0.644 0.520596
## n_yearYear 2 -0.35951 0.18275 -1.967 0.050529 .
## n_yearYear 3 -0.26070 0.17551 -1.485 0.138999
## n_yearYear 4+ -0.47677 0.23182 -2.057 0.041008 *
## age -0.02227 0.01611 -1.382 0.168346
## SE_fi_z 0.26218 0.06204 4.226 3.60e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8687 on 202 degrees of freedom
## (25 observations deleted due to missingness)
## Multiple R-squared: 0.3184, Adjusted R-squared: 0.2712
## F-statistic: 6.741 on 14 and 202 DF, p-value: 3.286e-11
summary(GAD_co2)
##
## Call:
## lm(formula = GADz ~ SE_co_z + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age + SE_fi_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.9091 -0.6297 -0.1229 0.5540 2.3933
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.502630 0.390110 1.288 0.19913
## SE_co_z -0.205024 0.065623 -3.124 0.00206 **
## n_disability1 0.752314 0.185466 4.056 7.22e-05 ***
## student.status1 -0.151396 0.167339 -0.905 0.36673
## student.status2 -0.023473 0.171181 -0.137 0.89107
## n_orientationSexual Minority 0.184706 0.150317 1.229 0.22064
## n_ethnicity1 0.001541 0.147149 0.010 0.99165
## n_gender1 -0.356757 0.504336 -0.707 0.48018
## n_gender2 0.231231 0.195471 1.183 0.23828
## UGPG1 0.097105 0.166721 0.582 0.56095
## n_yearYear 2 -0.299460 0.185474 -1.615 0.10803
## n_yearYear 3 -0.266848 0.187147 -1.426 0.15551
## n_yearYear 4+ -0.462886 0.235155 -1.968 0.05044 .
## age -0.034508 0.016404 -2.104 0.03669 *
## SE_fi_z 0.253189 0.063535 3.985 9.54e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8777 on 194 degrees of freedom
## (33 observations deleted due to missingness)
## Multiple R-squared: 0.3023, Adjusted R-squared: 0.252
## F-statistic: 6.005 on 14 and 194 DF, p-value: 8.627e-10
library(car)
## Loading required package: carData
##
## Attaching package: 'car'
## The following object is masked from 'package:dplyr':
##
## recode
## The following object is masked from 'package:purrr':
##
## some
## The following object is masked from 'package:psych':
##
## logit
#### assumption checks GAD####
anova(GAD_aca1, GAD_aca2)
## Analysis of Variance Table
##
## Model 1: GADz ~ SE_aca_z + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age
## Model 2: GADz ~ SE_aca_z + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age + SE_fi_z
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 203 149.72
## 2 202 143.91 1 5.8142 8.1614 0.004727 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(GAD_acc1, GAD_acc2)
## Analysis of Variance Table
##
## Model 1: GADz ~ SE_acc_z + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age
## Model 2: GADz ~ SE_acc_z + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age + SE_fi_z
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 203 149.72
## 2 202 143.91 1 5.8142 8.1614 0.004727 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(GAD_co1, GAD_co2)
## Analysis of Variance Table
##
## Model 1: GADz ~ SE_co_z + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age
## Model 2: GADz ~ SE_co_z + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age + SE_fi_z
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 195 161.69
## 2 194 149.45 1 12.234 15.881 9.543e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(GAD_fr1, GAD_fr2)
## Analysis of Variance Table
##
## Model 1: GADz ~ SE_fr_z + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age
## Model 2: GADz ~ SE_fr_z + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age + SE_fi_z
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 203 165.93
## 2 202 152.46 1 13.479 17.86 3.599e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(GAD_PHQ1, GAD_PHQ2)
## Analysis of Variance Table
##
## Model 1: GADz ~ PHQz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age
## Model 2: GADz ~ PHQz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age + SE_fi_z
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 203 81.475
## 2 202 81.313 1 0.16204 0.4025 0.5265
anova(GAD_CUDIT1, GAD_CUDIT2)
## Analysis of Variance Table
##
## Model 1: GADz ~ CUDITz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age
## Model 2: GADz ~ CUDITz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age + SE_fi_z
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 87 71.280
## 2 86 54.775 1 16.505 25.914 2.077e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(GAD_AUDIT1, GAD_AUDIT2)
## Analysis of Variance Table
##
## Model 1: GADz ~ AUDITz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age
## Model 2: GADz ~ AUDITz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age + SE_fi_z
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 203 176.32
## 2 202 162.24 1 14.074 17.523 4.236e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(GAD_unil1, GAD_unil2)
## Analysis of Variance Table
##
## Model 1: GADz ~ unil_z + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age
## Model 2: GADz ~ unil_z + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age + SE_fi_z
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 203 148.74
## 2 202 138.87 1 9.8703 14.358 0.0001995 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(GAD_prel1, GAD_prel2)
## Analysis of Variance Table
##
## Model 1: GADz ~ prel_z + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age
## Model 2: GADz ~ prel_z + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age + SE_fi_z
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 203 161.47
## 2 202 146.20 1 15.275 21.105 7.645e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(GAD_SA1, GAD_SA2)
## Analysis of Variance Table
##
## Model 1: GADz ~ SAz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age
## Model 2: GADz ~ SAz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age + SE_fi_z
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 203 129.88
## 2 202 122.44 1 7.4376 12.27 0.0005665 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(GAD_SCI1, GAD_SCI2)
## Analysis of Variance Table
##
## Model 1: GADz ~ SCInz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age
## Model 2: GADz ~ SCInz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age + SE_fi_z
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 198 119.31
## 2 197 116.18 1 3.1315 5.3101 0.02224 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(GAD_PS1, GAD_PS2)
## Analysis of Variance Table
##
## Model 1: GADz ~ PSz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age
## Model 2: GADz ~ PSz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age + SE_fi_z
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 200 102.36
## 2 199 100.51 1 1.8563 3.6755 0.05665 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(GAD_wellbeing1, GAD_wellbeing2)
## Analysis of Variance Table
##
## Model 1: GADz ~ wellbeingz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age
## Model 2: GADz ~ wellbeingz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age + SE_fi_z
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 200 104.40
## 2 199 102.67 1 1.7329 3.3588 0.06834 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(GAD_SC1, GAD_SC2)
## Analysis of Variance Table
##
## Model 1: GADz ~ SCz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age
## Model 2: GADz ~ SCz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age + SE_fi_z
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 203 177.82
## 2 202 164.08 1 13.744 16.921 5.671e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(GAD_perfectionism1, GAD_perfectionism2)
## Analysis of Variance Table
##
## Model 1: GADz ~ perfectionismz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age
## Model 2: GADz ~ perfectionismz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age + SE_fi_z
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 198 146.09
## 2 197 138.01 1 8.0771 11.53 0.0008284 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
car::Anova(GAD_aca2, type=3)
## Anova Table (Type III tests)
##
## Response: GADz
## Sum Sq Df F value Pr(>F)
## (Intercept) 0.239 1 0.3358 0.562892
## SE_aca_z 20.228 1 28.3944 2.631e-07 ***
## n_disability 7.182 1 10.0821 0.001732 **
## student.status 1.626 2 1.1409 0.321590
## n_orientation 2.196 1 3.0821 0.080673 .
## n_ethnicity 2.641 1 3.7078 0.055562 .
## n_gender 2.411 2 1.6922 0.186716
## UGPG 0.952 1 1.3357 0.249167
## n_year 7.959 3 3.7239 0.012277 *
## age 0.618 1 0.8673 0.352803
## SE_fi_z 5.814 1 8.1614 0.004727 **
## Residuals 143.905 202
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
car::Anova(GAD_acc2, type=3)
## Anova Table (Type III tests)
##
## Response: GADz
## Sum Sq Df F value Pr(>F)
## (Intercept) 0.239 1 0.3358 0.562892
## SE_acc_z 20.228 1 28.3944 2.631e-07 ***
## n_disability 7.182 1 10.0821 0.001732 **
## student.status 1.626 2 1.1409 0.321590
## n_orientation 2.196 1 3.0821 0.080673 .
## n_ethnicity 2.641 1 3.7078 0.055562 .
## n_gender 2.411 2 1.6922 0.186716
## UGPG 0.952 1 1.3357 0.249167
## n_year 7.959 3 3.7239 0.012277 *
## age 0.618 1 0.8673 0.352803
## SE_fi_z 5.814 1 8.1614 0.004727 **
## Residuals 143.905 202
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
car::Anova(GAD_co2, type=3)
## Anova Table (Type III tests)
##
## Response: GADz
## Sum Sq Df F value Pr(>F)
## (Intercept) 1.279 1 1.6601 0.199130
## SE_co_z 7.520 1 9.7611 0.002056 **
## n_disability 12.676 1 16.4540 7.218e-05 ***
## student.status 0.634 2 0.4115 0.663263
## n_orientation 1.163 1 1.5099 0.220643
## n_ethnicity 0.000 1 0.0001 0.991654
## n_gender 2.105 2 1.3664 0.257467
## UGPG 0.261 1 0.3392 0.560948
## n_year 4.478 3 1.9374 0.124887
## age 3.409 1 4.4255 0.036695 *
## SE_fi_z 12.234 1 15.8806 9.543e-05 ***
## Residuals 149.452 194
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
car::Anova(GAD_fr2, type=3)
## Anova Table (Type III tests)
##
## Response: GADz
## Sum Sq Df F value Pr(>F)
## (Intercept) 0.301 1 0.3984 0.528646
## SE_fr_z 11.679 1 15.4741 0.000115 ***
## n_disability 13.590 1 18.0060 3.354e-05 ***
## student.status 3.178 2 2.1055 0.124454
## n_orientation 1.133 1 1.5014 0.221878
## n_ethnicity 0.009 1 0.0124 0.911270
## n_gender 2.781 2 1.8426 0.161064
## UGPG 0.313 1 0.4142 0.520596
## n_year 5.341 3 2.3589 0.072776 .
## age 1.443 1 1.9113 0.168346
## SE_fi_z 13.479 1 17.8598 3.599e-05 ***
## Residuals 152.455 202
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
car::Anova(GAD_PHQ2, type=3)
## Anova Table (Type III tests)
##
## Response: GADz
## Sum Sq Df F value Pr(>F)
## (Intercept) 0.017 1 0.0430 0.836018
## PHQz 82.821 1 205.7467 < 2.2e-16 ***
## n_disability 0.488 1 1.2134 0.271973
## student.status 0.215 2 0.2671 0.765874
## n_orientation 0.719 1 1.7874 0.182752
## n_ethnicity 0.285 1 0.7080 0.401095
## n_gender 1.451 2 1.8025 0.167521
## UGPG 0.146 1 0.3639 0.547040
## n_year 4.959 3 4.1064 0.007426 **
## age 0.023 1 0.0575 0.810799
## SE_fi_z 0.162 1 0.4025 0.526501
## Residuals 81.313 202
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
car::Anova(GAD_CUDIT2, type=3)
## Anova Table (Type III tests)
##
## Response: GADz
## Sum Sq Df F value Pr(>F)
## (Intercept) 0.263 1 0.4131 0.52209
## CUDITz 1.678 1 2.6347 0.10821
## n_disability 4.360 1 6.8457 0.01049 *
## student.status 3.692 2 2.8983 0.06052 .
## n_orientation 0.171 1 0.2685 0.60570
## n_ethnicity 0.111 1 0.1743 0.67734
## n_gender 4.333 2 3.4018 0.03786 *
## UGPG 2.316 1 3.6355 0.05990 .
## n_year 0.911 3 0.4766 0.69938
## age 0.317 1 0.4977 0.48242
## SE_fi_z 16.505 1 25.9143 2.077e-06 ***
## Residuals 54.775 86
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
car::Anova(GAD_AUDIT2, type=3)
## Anova Table (Type III tests)
##
## Response: GADz
## Sum Sq Df F value Pr(>F)
## (Intercept) 0.470 1 0.5849 0.44527
## AUDITz 1.890 1 2.3537 0.12655
## n_disability 12.718 1 15.8340 9.637e-05 ***
## student.status 2.006 2 1.2489 0.28903
## n_orientation 1.664 1 2.0720 0.15157
## n_ethnicity 0.000 1 0.0000 0.99816
## n_gender 2.046 2 1.2736 0.28207
## UGPG 0.497 1 0.6193 0.43223
## n_year 6.946 3 2.8828 0.03691 *
## age 1.629 1 2.0284 0.15592
## SE_fi_z 14.074 1 17.5227 4.236e-05 ***
## Residuals 162.243 202
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
car::Anova(GAD_unil2, type=3)
## Anova Table (Type III tests)
##
## Response: GADz
## Sum Sq Df F value Pr(>F)
## (Intercept) 0.514 1 0.7473 0.3883541
## unil_z 25.267 1 36.7535 6.481e-09 ***
## n_disability 8.185 1 11.9059 0.0006812 ***
## student.status 2.128 2 1.5479 0.2151974
## n_orientation 0.982 1 1.4283 0.2334431
## n_ethnicity 0.022 1 0.0321 0.8580024
## n_gender 2.768 2 2.0130 0.1362569
## UGPG 1.159 1 1.6856 0.1956586
## n_year 5.179 3 2.5114 0.0597770 .
## age 2.048 1 2.9789 0.0858848 .
## SE_fi_z 9.870 1 14.3576 0.0001995 ***
## Residuals 138.867 202
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
car::Anova(GAD_prel2, type=3)
## Anova Table (Type III tests)
##
## Response: GADz
## Sum Sq Df F value Pr(>F)
## (Intercept) 0.814 1 1.1245 0.290228
## prel_z 17.934 1 24.7795 1.374e-06 ***
## n_disability 6.255 1 8.6430 0.003666 **
## student.status 1.622 2 1.1206 0.328091
## n_orientation 0.147 1 0.2036 0.652324
## n_ethnicity 0.261 1 0.3601 0.549112
## n_gender 4.340 2 2.9981 0.052105 .
## UGPG 0.919 1 1.2691 0.261267
## n_year 3.668 3 1.6896 0.170451
## age 2.452 1 3.3881 0.067135 .
## SE_fi_z 15.275 1 21.1053 7.645e-06 ***
## Residuals 146.199 202
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
car::Anova(GAD_SA2, type=3)
## Anova Table (Type III tests)
##
## Response: GADz
## Sum Sq Df F value Pr(>F)
## (Intercept) 0.019 1 0.0317 0.8587744
## SAz 41.693 1 68.7834 1.534e-14 ***
## n_disability 7.183 1 11.8499 0.0007008 ***
## student.status 0.703 2 0.5799 0.5608798
## n_orientation 0.036 1 0.0601 0.8066358
## n_ethnicity 0.029 1 0.0475 0.8277317
## n_gender 1.926 2 1.5891 0.2066421
## UGPG 0.163 1 0.2686 0.6048533
## n_year 3.897 3 2.1431 0.0959927 .
## age 0.282 1 0.4652 0.4959756
## SE_fi_z 7.438 1 12.2703 0.0005665 ***
## Residuals 122.441 202
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
car::Anova(GAD_SCI2, type=3)
## Anova Table (Type III tests)
##
## Response: GADz
## Sum Sq Df F value Pr(>F)
## (Intercept) 0.040 1 0.0685 0.793746
## SCInz 42.310 1 71.7460 5.622e-15 ***
## n_disability 4.842 1 8.2100 0.004618 **
## student.status 0.960 2 0.8138 0.444667
## n_orientation 0.470 1 0.7974 0.372962
## n_ethnicity 0.054 1 0.0915 0.762646
## n_gender 3.155 2 2.6746 0.071440 .
## UGPG 0.458 1 0.7759 0.379466
## n_year 4.367 3 2.4682 0.063284 .
## age 0.873 1 1.4807 0.225115
## SE_fi_z 3.132 1 5.3101 0.022244 *
## Residuals 116.176 197
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
car::Anova(GAD_PS2, type=3)
## Anova Table (Type III tests)
##
## Response: GADz
## Sum Sq Df F value Pr(>F)
## (Intercept) 0.183 1 0.3615 0.54835
## PSz 62.288 1 123.3282 < 2e-16 ***
## n_disability 2.063 1 4.0840 0.04463 *
## student.status 0.013 2 0.0128 0.98732
## n_orientation 0.763 1 1.5098 0.22063
## n_ethnicity 0.725 1 1.4349 0.23239
## n_gender 2.990 2 2.9596 0.05412 .
## UGPG 0.446 1 0.8839 0.34827
## n_year 5.606 3 3.7000 0.01269 *
## age 0.309 1 0.6112 0.43526
## SE_fi_z 1.856 1 3.6755 0.05665 .
## Residuals 100.507 199
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
car::Anova(GAD_wellbeing2, type=3)
## Anova Table (Type III tests)
##
## Response: GADz
## Sum Sq Df F value Pr(>F)
## (Intercept) 0.353 1 0.6845 0.40904
## wellbeingz 60.124 1 116.5357 < 2e-16 ***
## n_disability 3.100 1 6.0080 0.01510 *
## student.status 0.043 2 0.0413 0.95957
## n_orientation 1.320 1 2.5590 0.11126
## n_ethnicity 0.001 1 0.0017 0.96695
## n_gender 2.705 2 2.6213 0.07522 .
## UGPG 0.093 1 0.1809 0.67103
## n_year 4.736 3 3.0600 0.02933 *
## age 0.001 1 0.0015 0.96920
## SE_fi_z 1.733 1 3.3588 0.06834 .
## Residuals 102.670 199
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
car::Anova(GAD_SC2, type=3)
## Anova Table (Type III tests)
##
## Response: GADz
## Sum Sq Df F value Pr(>F)
## (Intercept) 0.776 1 0.9558 0.3294276
## SCz 0.057 1 0.0707 0.7905999
## n_disability 12.486 1 15.3714 0.0001209 ***
## student.status 2.113 2 1.3005 0.2746643
## n_orientation 1.845 1 2.2712 0.1333580
## n_ethnicity 0.011 1 0.0132 0.9085105
## n_gender 1.665 2 1.0247 0.3607453
## UGPG 0.697 1 0.8585 0.3552768
## n_year 6.347 3 2.6046 0.0529811 .
## age 2.102 1 2.5874 0.1092806
## SE_fi_z 13.744 1 16.9209 5.671e-05 ***
## Residuals 164.076 202
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
car::Anova(GAD_perfectionism2, type=3)
## Anova Table (Type III tests)
##
## Response: GADz
## Sum Sq Df F value Pr(>F)
## (Intercept) 0.132 1 0.1887 0.6644936
## perfectionismz 20.476 1 29.2280 1.849e-07 ***
## n_disability 7.906 1 11.2854 0.0009379 ***
## student.status 2.217 2 1.5826 0.2080469
## n_orientation 0.808 1 1.1540 0.2840248
## n_ethnicity 0.005 1 0.0065 0.9357341
## n_gender 1.694 2 1.2087 0.3007806
## UGPG 0.956 1 1.3649 0.2441039
## n_year 5.235 3 2.4910 0.0614500 .
## age 1.049 1 1.4978 0.2224738
## SE_fi_z 8.077 1 11.5295 0.0008284 ***
## Residuals 138.010 197
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
hist(resid(GAD_PHQ2))
hist(resid(GAD_CUDIT2))
hist(resid(GAD_AUDIT2))
hist(resid(GAD_unil2))
hist(resid(GAD_prel2))
hist(resid(GAD_SA2))
hist(resid(GAD_SCI2))
hist(resid(GAD_PS2))
hist(resid(GAD_wellbeing2))
hist(resid(GAD_SC2))
hist(resid(GAD_perfectionism2))
hist(resid(GAD_aca2))
hist(resid(GAD_acc2))
hist(resid(GAD_fr2))
hist(resid(GAD_co2))
skewness(resid(GAD_PHQ2))
## [1] 0.450141
skewness(resid(GAD_CUDIT2))
## [1] 0.4764829
skewness(resid(GAD_AUDIT2))
## [1] 0.5936116
skewness(resid(GAD_unil2))
## [1] 0.6091435
skewness(resid(GAD_prel2))
## [1] 0.4996352
skewness(resid(GAD_SA2))
## [1] 0.5139783
skewness(resid(GAD_SCI2))
## [1] 0.5855343
skewness(resid(GAD_PS2))
## [1] 0.4215832
skewness(resid(GAD_wellbeing2))
## [1] 0.5153961
skewness(resid(GAD_SC2))
## [1] 0.5556626
skewness(resid(GAD_perfectionism2))
## [1] 0.634839
skewness(resid(GAD_aca2))
## [1] 0.4442322
skewness(resid(GAD_acc2))
## [1] 0.4442322
skewness(resid(GAD_fr2))
## [1] 0.5771022
skewness(resid(GAD_co2))
## [1] 0.5253917
qqPlot(GAD_PHQ2)
## [1] 157 230
qqPlot(GAD_AUDIT2)
## [1] 90 197
qqPlot(GAD_unil2)
## [1] 86 90
qqPlot(GAD_prel2)
## [1] 35 141
qqPlot(GAD_SA2)
## [1] 90 197
qqPlot(GAD_SCI2)
## [1] 111 197
qqPlot(GAD_PS2)
## [1] 147 197
qqPlot(GAD_wellbeing2)
## [1] 35 161
qqPlot(GAD_SC2)
## [1] 90 197
qqPlot(GAD_perfectionism2)
## [1] 90 197
qqPlot(GAD_aca2)
## [1] 111 197
qqPlot(GAD_acc2)
## [1] 111 197
qqPlot(GAD_fr2)
## [1] 86 197
qqPlot(GAD_co2)
## [1] 90 197
a1 <- vif(GAD_PHQ2)
b2 <- vif(GAD_CUDIT2)
c3 <- vif(GAD_AUDIT2)
d4 <- vif(GAD_unil2)
e5 <- vif(GAD_prel2)
f6 <- vif(GAD_SA2)
g7 <- vif(GAD_SCI2)
h8 <- vif(GAD_PS2)
i9 <- vif(GAD_wellbeing2)
j10 <- vif(GAD_SC2)
k11 <- vif(GAD_perfectionism2)
l12 <- vif(GAD_aca2)
m13 <- vif(GAD_acc2)
n14 <- vif(GAD_fr2)
o15 <- vif(GAD_co2)
a1
## GVIF Df GVIF^(1/(2*Df))
## PHQz 1.421101 1 1.192099
## n_disability 1.398833 1 1.182723
## student.status 1.571843 2 1.119702
## n_orientation 1.144886 1 1.069994
## n_ethnicity 1.366058 1 1.168785
## n_gender 1.243750 2 1.056047
## UGPG 1.773439 1 1.331705
## n_year 1.461917 3 1.065337
## age 1.845703 1 1.358566
## SE_fi_z 1.269862 1 1.126881
b2
## GVIF Df GVIF^(1/(2*Df))
## CUDITz 1.309466 1 1.144319
## n_disability 1.235014 1 1.111312
## student.status 1.473269 2 1.101718
## n_orientation 1.219652 1 1.104378
## n_ethnicity 1.394761 1 1.181000
## n_gender 1.405155 2 1.088757
## UGPG 2.246895 1 1.498965
## n_year 2.166743 3 1.137543
## age 1.825997 1 1.351295
## SE_fi_z 1.306770 1 1.143140
c3
## GVIF Df GVIF^(1/(2*Df))
## AUDITz 1.064927 1 1.031953
## n_disability 1.278374 1 1.130652
## student.status 1.551259 2 1.116018
## n_orientation 1.145813 1 1.070427
## n_ethnicity 1.369165 1 1.170113
## n_gender 1.251139 2 1.057612
## UGPG 1.786080 1 1.336443
## n_year 1.459714 3 1.065070
## age 1.820758 1 1.349355
## SE_fi_z 1.117466 1 1.057103
d4
## GVIF Df GVIF^(1/(2*Df))
## unil_z 1.098716 1 1.048197
## n_disability 1.298968 1 1.139723
## student.status 1.551578 2 1.116075
## n_orientation 1.147791 1 1.071350
## n_ethnicity 1.363038 1 1.167492
## n_gender 1.247271 2 1.056794
## UGPG 1.772715 1 1.331433
## n_year 1.453297 3 1.064288
## age 1.788667 1 1.337411
## SE_fi_z 1.133631 1 1.064721
e5
## GVIF Df GVIF^(1/(2*Df))
## prel_z 1.286030 1 1.134033
## n_disability 1.344463 1 1.159510
## student.status 1.551097 2 1.115989
## n_orientation 1.203095 1 1.096857
## n_ethnicity 1.376138 1 1.173089
## n_gender 1.285717 2 1.064845
## UGPG 1.770194 1 1.330487
## n_year 1.475486 3 1.066979
## age 1.789427 1 1.337695
## SE_fi_z 1.114844 1 1.055862
f6
## GVIF Df GVIF^(1/(2*Df))
## SAz 1.220849 1 1.104920
## n_disability 1.298849 1 1.139670
## student.status 1.559688 2 1.117531
## n_orientation 1.179619 1 1.086103
## n_ethnicity 1.363066 1 1.167504
## n_gender 1.238401 2 1.054910
## UGPG 1.777106 1 1.333081
## n_year 1.486672 3 1.068323
## age 1.826113 1 1.351338
## SE_fi_z 1.144716 1 1.069914
g7
## GVIF Df GVIF^(1/(2*Df))
## SCInz 1.249145 1 1.117651
## n_disability 1.351606 1 1.162586
## student.status 1.571898 2 1.119711
## n_orientation 1.152501 1 1.073546
## n_ethnicity 1.372011 1 1.171329
## n_gender 1.247180 2 1.056774
## UGPG 1.769814 1 1.330343
## n_year 1.455428 3 1.064548
## age 1.782763 1 1.335202
## SE_fi_z 1.214412 1 1.102004
h8
## GVIF Df GVIF^(1/(2*Df))
## PSz 1.348801 1 1.161379
## n_disability 1.367460 1 1.169384
## student.status 1.567793 2 1.118980
## n_orientation 1.145029 1 1.070060
## n_ethnicity 1.371249 1 1.171003
## n_gender 1.252204 2 1.057837
## UGPG 1.767469 1 1.329462
## n_year 1.475302 3 1.066957
## age 1.797619 1 1.340753
## SE_fi_z 1.214669 1 1.102120
i9
## GVIF Df GVIF^(1/(2*Df))
## wellbeingz 1.321962 1 1.149766
## n_disability 1.344368 1 1.159469
## student.status 1.589420 2 1.122819
## n_orientation 1.141055 1 1.068202
## n_ethnicity 1.355534 1 1.164274
## n_gender 1.240061 2 1.055263
## UGPG 1.774370 1 1.332055
## n_year 1.456568 3 1.064687
## age 1.838201 1 1.355803
## SE_fi_z 1.221941 1 1.105414
j10
## GVIF Df GVIF^(1/(2*Df))
## SCz 1.072830 1 1.035775
## n_disability 1.277648 1 1.130331
## student.status 1.552465 2 1.116235
## n_orientation 1.148564 1 1.071711
## n_ethnicity 1.364543 1 1.168137
## n_gender 1.238397 2 1.054909
## UGPG 1.771189 1 1.330860
## n_year 1.443574 3 1.063098
## age 1.799097 1 1.341304
## SE_fi_z 1.158847 1 1.076498
k11
## GVIF Df GVIF^(1/(2*Df))
## perfectionismz 1.134169 1 1.064974
## n_disability 1.332899 1 1.154513
## student.status 1.554018 2 1.116514
## n_orientation 1.150180 1 1.072465
## n_ethnicity 1.370313 1 1.170604
## n_gender 1.246518 2 1.056634
## UGPG 1.767297 1 1.329397
## n_year 1.452111 3 1.064143
## age 1.787824 1 1.337095
## SE_fi_z 1.159032 1 1.076583
l12
## GVIF Df GVIF^(1/(2*Df))
## SE_aca_z 1.394807 1 1.181019
## n_disability 1.319175 1 1.148554
## student.status 1.555608 2 1.116799
## n_orientation 1.141541 1 1.068429
## n_ethnicity 1.542722 1 1.242063
## n_gender 1.243054 2 1.055899
## UGPG 1.770416 1 1.330570
## n_year 1.458436 3 1.064914
## age 1.829124 1 1.352451
## SE_fi_z 1.209841 1 1.099928
m13
## GVIF Df GVIF^(1/(2*Df))
## SE_acc_z 1.394807 1 1.181019
## n_disability 1.319175 1 1.148554
## student.status 1.555608 2 1.116799
## n_orientation 1.141541 1 1.068429
## n_ethnicity 1.542722 1 1.242063
## n_gender 1.243054 2 1.055899
## UGPG 1.770416 1 1.330570
## n_year 1.458436 3 1.064914
## age 1.829124 1 1.352451
## SE_fi_z 1.209841 1 1.099928
n14
## GVIF Df GVIF^(1/(2*Df))
## SE_fr_z 1.081821 1 1.040106
## n_disability 1.280302 1 1.131504
## student.status 1.572642 2 1.119844
## n_orientation 1.150569 1 1.072646
## n_ethnicity 1.362886 1 1.167427
## n_gender 1.258821 2 1.059232
## UGPG 1.781047 1 1.334559
## n_year 1.460243 3 1.065134
## age 1.799517 1 1.341461
## SE_fi_z 1.116678 1 1.056730
o15
## GVIF Df GVIF^(1/(2*Df))
## SE_co_z 1.127726 1 1.061944
## n_disability 1.301065 1 1.140642
## student.status 1.654736 2 1.134181
## n_orientation 1.145706 1 1.070377
## n_ethnicity 1.387863 1 1.178076
## n_gender 1.261269 2 1.059746
## UGPG 1.745027 1 1.320995
## n_year 1.470889 3 1.066424
## age 1.784916 1 1.336008
## SE_fi_z 1.113887 1 1.055408
ta1 <- 1/a1
tb2 <- 1/b2
tc3 <- 1/c3
td4 <- 1/d4
te5 <- 1/e5
tf6 <- 1/f6
tg7 <- 1/g7
th8 <- 1/h8
ti9 <- 1/i9
tj10 <- 1/j10
tk11 <- 1/k11
tl12 <- 1/l12
tm13 <- 1/m13
tn14 <- 1/n14
to15 <- 1/o15
ta1
## GVIF Df GVIF^(1/(2*Df))
## PHQz 0.7036798 1.0000000 0.8388563
## n_disability 0.7148816 1.0000000 0.8455067
## student.status 0.6361958 0.5000000 0.8930951
## n_orientation 0.8734493 1.0000000 0.9345851
## n_ethnicity 0.7320333 1.0000000 0.8555895
## n_gender 0.8040199 0.5000000 0.9469274
## UGPG 0.5638762 1.0000000 0.7509169
## n_year 0.6840332 0.3333333 0.9386698
## age 0.5417990 1.0000000 0.7360700
## SE_fi_z 0.7874874 1.0000000 0.8874049
tb2
## GVIF Df GVIF^(1/(2*Df))
## CUDITz 0.7636699 1.0000000 0.8738821
## n_disability 0.8097072 1.0000000 0.8998373
## student.status 0.6787625 0.5000000 0.9076731
## n_orientation 0.8199062 1.0000000 0.9054867
## n_ethnicity 0.7169689 1.0000000 0.8467402
## n_gender 0.7116655 0.5000000 0.9184785
## UGPG 0.4450586 1.0000000 0.6671271
## n_year 0.4615221 0.3333333 0.8790875
## age 0.5476459 1.0000000 0.7400310
## SE_fi_z 0.7652458 1.0000000 0.8747833
tc3
## GVIF Df GVIF^(1/(2*Df))
## AUDITz 0.9390314 1.0000000 0.9690363
## n_disability 0.7822439 1.0000000 0.8844455
## student.status 0.6446375 0.5000000 0.8960431
## n_orientation 0.8727424 1.0000000 0.9342068
## n_ethnicity 0.7303723 1.0000000 0.8546182
## n_gender 0.7992714 0.5000000 0.9455262
## UGPG 0.5598852 1.0000000 0.7482548
## n_year 0.6850658 0.3333333 0.9389059
## age 0.5492217 1.0000000 0.7410949
## SE_fi_z 0.8948814 1.0000000 0.9459817
td4
## GVIF Df GVIF^(1/(2*Df))
## unil_z 0.9101531 1.0000000 0.9540194
## n_disability 0.7698416 1.0000000 0.8774062
## student.status 0.6445052 0.5000000 0.8959971
## n_orientation 0.8712386 1.0000000 0.9334016
## n_ethnicity 0.7336554 1.0000000 0.8565368
## n_gender 0.8017504 0.5000000 0.9462585
## UGPG 0.5641064 1.0000000 0.7510702
## n_year 0.6880906 0.3333333 0.9395955
## age 0.5590755 1.0000000 0.7477135
## SE_fi_z 0.8821212 1.0000000 0.9392131
te5
## GVIF Df GVIF^(1/(2*Df))
## prel_z 0.7775865 1.0000000 0.8818087
## n_disability 0.7437916 1.0000000 0.8624336
## student.status 0.6447048 0.5000000 0.8960665
## n_orientation 0.8311896 1.0000000 0.9116960
## n_ethnicity 0.7266714 1.0000000 0.8524502
## n_gender 0.7777762 0.5000000 0.9391039
## UGPG 0.5649097 1.0000000 0.7516048
## n_year 0.6777426 0.3333333 0.9372256
## age 0.5588381 1.0000000 0.7475547
## SE_fi_z 0.8969866 1.0000000 0.9470938
tf6
## GVIF Df GVIF^(1/(2*Df))
## SAz 0.8191022 1.0000000 0.9050427
## n_disability 0.7699127 1.0000000 0.8774467
## student.status 0.6411538 0.5000000 0.8948301
## n_orientation 0.8477313 1.0000000 0.9207232
## n_ethnicity 0.7336403 1.0000000 0.8565281
## n_gender 0.8074927 0.5000000 0.9479483
## UGPG 0.5627127 1.0000000 0.7501418
## n_year 0.6726435 0.3333333 0.9360467
## age 0.5476112 1.0000000 0.7400076
## SE_fi_z 0.8735791 1.0000000 0.9346545
tg7
## GVIF Df GVIF^(1/(2*Df))
## SCInz 0.8005478 1.0000000 0.8947334
## n_disability 0.7398608 1.0000000 0.8601516
## student.status 0.6361737 0.5000000 0.8930873
## n_orientation 0.8676784 1.0000000 0.9314926
## n_ethnicity 0.7288574 1.0000000 0.8537314
## n_gender 0.8018090 0.5000000 0.9462758
## UGPG 0.5650313 1.0000000 0.7516856
## n_year 0.6870832 0.3333333 0.9393661
## age 0.5609270 1.0000000 0.7489506
## SE_fi_z 0.8234435 1.0000000 0.9074379
th8
## GVIF Df GVIF^(1/(2*Df))
## PSz 0.7413990 1.0000000 0.8610453
## n_disability 0.7312831 1.0000000 0.8551509
## student.status 0.6378393 0.5000000 0.8936713
## n_orientation 0.8733403 1.0000000 0.9345268
## n_ethnicity 0.7292624 1.0000000 0.8539686
## n_gender 0.7985920 0.5000000 0.9453252
## UGPG 0.5657806 1.0000000 0.7521839
## n_year 0.6778274 0.3333333 0.9372451
## age 0.5562913 1.0000000 0.7458494
## SE_fi_z 0.8232698 1.0000000 0.9073422
ti9
## GVIF Df GVIF^(1/(2*Df))
## wellbeingz 0.7564515 1.0000000 0.8697422
## n_disability 0.7438439 1.0000000 0.8624638
## student.status 0.6291604 0.5000000 0.8906157
## n_orientation 0.8763820 1.0000000 0.9361527
## n_ethnicity 0.7377168 1.0000000 0.8589044
## n_gender 0.8064122 0.5000000 0.9476310
## UGPG 0.5635802 1.0000000 0.7507198
## n_year 0.6865452 0.3333333 0.9392435
## age 0.5440102 1.0000000 0.7375705
## SE_fi_z 0.8183701 1.0000000 0.9046381
tj10
## GVIF Df GVIF^(1/(2*Df))
## SCz 0.9321145 1.0000000 0.9654608
## n_disability 0.7826883 1.0000000 0.8846968
## student.status 0.6441369 0.5000000 0.8958691
## n_orientation 0.8706520 1.0000000 0.9330874
## n_ethnicity 0.7328460 1.0000000 0.8560642
## n_gender 0.8074953 0.5000000 0.9479490
## UGPG 0.5645925 1.0000000 0.7513937
## n_year 0.6927253 0.3333333 0.9406474
## age 0.5558345 1.0000000 0.7455431
## SE_fi_z 0.8629267 1.0000000 0.9289385
tk11
## GVIF Df GVIF^(1/(2*Df))
## perfectionismz 0.8817026 1.0000000 0.9389902
## n_disability 0.7502442 1.0000000 0.8661664
## student.status 0.6434930 0.5000000 0.8956451
## n_orientation 0.8694290 1.0000000 0.9324318
## n_ethnicity 0.7297600 1.0000000 0.8542599
## n_gender 0.8022349 0.5000000 0.9464014
## UGPG 0.5658359 1.0000000 0.7522206
## n_year 0.6886526 0.3333333 0.9397234
## age 0.5593392 1.0000000 0.7478898
## SE_fi_z 0.8627893 1.0000000 0.9288645
tl12
## GVIF Df GVIF^(1/(2*Df))
## SE_aca_z 0.7169452 1.0000000 0.8467262
## n_disability 0.7580493 1.0000000 0.8706603
## student.status 0.6428357 0.5000000 0.8954163
## n_orientation 0.8760092 1.0000000 0.9359536
## n_ethnicity 0.6482051 1.0000000 0.8051118
## n_gender 0.8044701 0.5000000 0.9470599
## UGPG 0.5648389 1.0000000 0.7515577
## n_year 0.6856658 0.3333333 0.9390429
## age 0.5467099 1.0000000 0.7393984
## SE_fi_z 0.8265546 1.0000000 0.9091505
tm13
## GVIF Df GVIF^(1/(2*Df))
## SE_acc_z 0.7169452 1.0000000 0.8467262
## n_disability 0.7580493 1.0000000 0.8706603
## student.status 0.6428357 0.5000000 0.8954163
## n_orientation 0.8760092 1.0000000 0.9359536
## n_ethnicity 0.6482051 1.0000000 0.8051118
## n_gender 0.8044701 0.5000000 0.9470599
## UGPG 0.5648389 1.0000000 0.7515577
## n_year 0.6856658 0.3333333 0.9390429
## age 0.5467099 1.0000000 0.7393984
## SE_fi_z 0.8265546 1.0000000 0.9091505
tn14
## GVIF Df GVIF^(1/(2*Df))
## SE_fr_z 0.9243671 1.0000000 0.9614401
## n_disability 0.7810660 1.0000000 0.8837794
## student.status 0.6358725 0.5000000 0.8929816
## n_orientation 0.8691353 1.0000000 0.9322742
## n_ethnicity 0.7337372 1.0000000 0.8565846
## n_gender 0.7943939 0.5000000 0.9440804
## UGPG 0.5614674 1.0000000 0.7493113
## n_year 0.6848177 0.3333333 0.9388492
## age 0.5557046 1.0000000 0.7454560
## SE_fi_z 0.8955134 1.0000000 0.9463157
to15
## GVIF Df GVIF^(1/(2*Df))
## SE_co_z 0.8867405 1.0000000 0.9416690
## n_disability 0.7686011 1.0000000 0.8766990
## student.status 0.6043260 0.5000000 0.8816939
## n_orientation 0.8728243 1.0000000 0.9342507
## n_ethnicity 0.7205320 1.0000000 0.8488416
## n_gender 0.7928521 0.5000000 0.9436220
## UGPG 0.5730570 1.0000000 0.7570053
## n_year 0.6798611 0.3333333 0.9377132
## age 0.5602503 1.0000000 0.7484987
## SE_fi_z 0.8977575 1.0000000 0.9475007
#### summary PHQ####
summary(PHQ_GAD)
##
## Call:
## lm(formula = PHQz ~ GADz, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.02243 -0.38427 -0.04824 0.38779 2.02454
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.001051 0.040834 -0.026 0.979
## GADz 0.779354 0.040898 19.056 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.6352 on 240 degrees of freedom
## Multiple R-squared: 0.6021, Adjusted R-squared: 0.6004
## F-statistic: 363.1 on 1 and 240 DF, p-value: < 2.2e-16
summary(PHQ_CUDIT)
##
## Call:
## lm(formula = PHQz ~ CUDITz, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.3462 -0.8087 -0.2088 0.5163 2.3538
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.03374 0.08952 0.377 0.707
## CUDITz 0.12502 0.09079 1.377 0.171
##
## Residual standard error: 0.9516 on 111 degrees of freedom
## (129 observations deleted due to missingness)
## Multiple R-squared: 0.0168, Adjusted R-squared: 0.00794
## F-statistic: 1.896 on 1 and 111 DF, p-value: 0.1713
summary(PHQ_AUDIT)
##
## Call:
## lm(formula = PHQz ~ AUDITz, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.6428 -0.7982 -0.2617 0.7388 2.9018
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.002032 0.064473 -0.032 0.975
## AUDITz 0.090667 0.064354 1.409 0.160
##
## Residual standard error: 1.003 on 240 degrees of freedom
## Multiple R-squared: 0.008203, Adjusted R-squared: 0.00407
## F-statistic: 1.985 on 1 and 240 DF, p-value: 0.1602
summary(PHQ_unil)
##
## Call:
## lm(formula = PHQz ~ unil_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.4435 -0.5981 -0.1386 0.5584 3.0614
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.00684 0.05632 -0.121 0.903
## unil_z 0.50307 0.05732 8.777 3.21e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8762 on 240 degrees of freedom
## Multiple R-squared: 0.243, Adjusted R-squared: 0.2398
## F-statistic: 77.03 on 1 and 240 DF, p-value: 3.212e-16
summary(PHQ_prel)
##
## Call:
## lm(formula = PHQz ~ prel_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.8909 -0.6714 -0.1650 0.4383 3.3415
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.004671 0.059143 -0.079 0.937
## prel_z 0.412938 0.059905 6.893 4.78e-11 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.92 on 240 degrees of freedom
## Multiple R-squared: 0.1653, Adjusted R-squared: 0.1618
## F-statistic: 47.52 on 1 and 240 DF, p-value: 4.782e-11
summary(PHQ_SA)
##
## Call:
## lm(formula = PHQz ~ SAz, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.80229 -0.65723 -0.07847 0.47282 2.14277
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.004722 0.054792 0.086 0.931
## SAz 0.525035 0.053849 9.750 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8523 on 240 degrees of freedom
## Multiple R-squared: 0.2837, Adjusted R-squared: 0.2807
## F-statistic: 95.07 on 1 and 240 DF, p-value: < 2.2e-16
summary(PHQ_SCI)
##
## Call:
## lm(formula = PHQz ~ SCInz, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.5460 -0.4685 -0.1460 0.4130 2.6126
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.01071 0.04961 -0.216 0.829
## SCInz 0.66044 0.04947 13.351 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.7622 on 234 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.4324, Adjusted R-squared: 0.43
## F-statistic: 178.2 on 1 and 234 DF, p-value: < 2.2e-16
summary(PHQ_PS)
##
## Call:
## lm(formula = PHQz ~ PSz, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.54098 -0.49414 0.00246 0.48474 2.22358
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.004161 0.045335 -0.092 0.927
## PSz 0.725728 0.045407 15.983 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.6994 on 236 degrees of freedom
## (4 observations deleted due to missingness)
## Multiple R-squared: 0.5198, Adjusted R-squared: 0.5177
## F-statistic: 255.4 on 1 and 236 DF, p-value: < 2.2e-16
summary(PHQ_wellbeing)
##
## Call:
## lm(formula = PHQz ~ wellbeingz, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.44316 -0.52265 -0.01138 0.41444 2.01056
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.0007112 0.0430922 -0.017 0.987
## wellbeingz -0.7582034 0.0432076 -17.548 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.6648 on 236 degrees of freedom
## (4 observations deleted due to missingness)
## Multiple R-squared: 0.5661, Adjusted R-squared: 0.5643
## F-statistic: 307.9 on 1 and 236 DF, p-value: < 2.2e-16
summary(PHQ_SC)
##
## Call:
## lm(formula = PHQz ~ SCz, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.4472 -0.7900 -0.2215 0.6653 2.9040
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.003617 0.062671 -0.058 0.954
## SCz -0.250840 0.062611 -4.006 8.23e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9749 on 240 degrees of freedom
## Multiple R-squared: 0.06269, Adjusted R-squared: 0.05878
## F-statistic: 16.05 on 1 and 240 DF, p-value: 8.23e-05
summary(PHQ_perfectionism)
##
## Call:
## lm(formula = PHQz ~ perfectionismz, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.8380 -0.6670 -0.2267 0.6056 2.5733
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.009308 0.060621 -0.154 0.878
## perfectionismz 0.393347 0.060596 6.491 5.04e-10 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9313 on 234 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.1526, Adjusted R-squared: 0.149
## F-statistic: 42.14 on 1 and 234 DF, p-value: 5.037e-10
summary(PHQ_aca)
##
## Call:
## lm(formula = PHQz ~ SE_aca_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.4005 -0.6813 -0.1409 0.5896 2.5179
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.002951 0.058566 -0.050 0.96
## SE_aca_z -0.429806 0.058925 -7.294 4.36e-12 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9111 on 240 degrees of freedom
## Multiple R-squared: 0.1815, Adjusted R-squared: 0.178
## F-statistic: 53.2 on 1 and 240 DF, p-value: 4.358e-12
summary(PHQ_fi)
##
## Call:
## lm(formula = PHQz ~ SE_fi_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.7436 -0.7552 -0.1986 0.7418 2.5715
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.001878 0.059786 -0.031 0.975
## SE_fi_z 0.383905 0.059688 6.432 6.76e-10 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.93 on 240 degrees of freedom
## Multiple R-squared: 0.147, Adjusted R-squared: 0.1435
## F-statistic: 41.37 on 1 and 240 DF, p-value: 6.763e-10
summary(PHQ_acc)
##
## Call:
## lm(formula = PHQz ~ SE_acc_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.4005 -0.6813 -0.1409 0.5896 2.5179
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.002951 0.058566 -0.050 0.96
## SE_acc_z -0.429806 0.058925 -7.294 4.36e-12 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9111 on 240 degrees of freedom
## Multiple R-squared: 0.1815, Adjusted R-squared: 0.178
## F-statistic: 53.2 on 1 and 240 DF, p-value: 4.358e-12
summary(PHQ_fr)
##
## Call:
## lm(formula = PHQz ~ SE_fr_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.9000 -0.6861 -0.2354 0.7131 2.9589
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.005148 0.061831 -0.083 0.934
## SE_fr_z -0.297140 0.061865 -4.803 2.75e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9618 on 240 degrees of freedom
## Multiple R-squared: 0.08769, Adjusted R-squared: 0.08389
## F-statistic: 23.07 on 1 and 240 DF, p-value: 2.754e-06
summary(PHQ_co)
##
## Call:
## lm(formula = PHQz ~ SE_co_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.5119 -0.7651 -0.2360 0.6931 2.9349
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.002001 0.064528 -0.031 0.97528
## SE_co_z -0.189891 0.064828 -2.929 0.00374 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.987 on 232 degrees of freedom
## (8 observations deleted due to missingness)
## Multiple R-squared: 0.03566, Adjusted R-squared: 0.03151
## F-statistic: 8.58 on 1 and 232 DF, p-value: 0.003738
summary(PHQ_GAD1)
##
## Call:
## lm(formula = PHQz ~ GADz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.9811 -0.3491 -0.0330 0.3100 1.9374
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.341023 0.276711 1.232 0.2192
## GADz 0.734377 0.047162 15.571 <2e-16 ***
## n_disability1 0.279851 0.133460 2.097 0.0372 *
## student.status1 -0.105651 0.117328 -0.900 0.3689
## student.status2 -0.102245 0.116562 -0.877 0.3814
## n_orientationSexual Minority -0.009257 0.105322 -0.088 0.9300
## n_ethnicity1 0.104151 0.102824 1.013 0.3123
## n_gender1 0.497653 0.360031 1.382 0.1684
## n_gender2 -0.042807 0.136203 -0.314 0.7536
## UGPG1 -0.056575 0.116307 -0.486 0.6272
## n_yearYear 2 0.042731 0.133643 0.320 0.7495
## n_yearYear 3 0.277016 0.127621 2.171 0.0311 *
## n_yearYear 4+ 0.174930 0.169125 1.034 0.3022
## age -0.018811 0.011675 -1.611 0.1087
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.6306 on 203 degrees of freedom
## (25 observations deleted due to missingness)
## Multiple R-squared: 0.6346, Adjusted R-squared: 0.6112
## F-statistic: 27.12 on 13 and 203 DF, p-value: < 2.2e-16
summary(PHQ_CUDIT1)
##
## Call:
## lm(formula = PHQz ~ CUDITz + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.32664 -0.51339 -0.05933 0.38251 2.41662
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.230599 0.620174 0.372 0.71092
## CUDITz 0.041704 0.095465 0.437 0.66330
## n_disability1 0.753368 0.233766 3.223 0.00179 **
## student.status1 -0.569060 0.218942 -2.599 0.01098 *
## student.status2 -0.094166 0.246510 -0.382 0.70339
## n_orientationSexual Minority 0.343045 0.196247 1.748 0.08399 .
## n_ethnicity1 -0.097102 0.209259 -0.464 0.64379
## n_gender1 1.174792 0.942252 1.247 0.21582
## n_gender2 0.067178 0.272326 0.247 0.80574
## UGPG1 -0.038978 0.242646 -0.161 0.87275
## n_yearYear 2 0.013051 0.256444 0.051 0.95953
## n_yearYear 3 -0.004024 0.259879 -0.015 0.98768
## n_yearYear 4+ -0.266509 0.324865 -0.820 0.41425
## age -0.015349 0.025979 -0.591 0.55617
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8443 on 87 degrees of freedom
## (141 observations deleted due to missingness)
## Multiple R-squared: 0.2979, Adjusted R-squared: 0.193
## F-statistic: 2.839 on 13 and 87 DF, p-value: 0.001935
summary(PHQ_AUDIT1)
##
## Call:
## lm(formula = PHQz ~ AUDITz + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.5629 -0.6411 -0.2536 0.4768 2.7698
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.57447 0.41159 1.396 0.1643
## AUDITz 0.08132 0.06524 1.246 0.2141
## n_disability1 0.85364 0.18946 4.506 1.12e-05 ***
## student.status1 -0.32689 0.17186 -1.902 0.0586 .
## student.status2 -0.13409 0.17227 -0.778 0.4373
## n_orientationSexual Minority 0.20452 0.15432 1.325 0.1866
## n_ethnicity1 0.09754 0.15209 0.641 0.5220
## n_gender1 0.20364 0.53078 0.384 0.7016
## n_gender2 0.06209 0.20175 0.308 0.7586
## UGPG1 -0.04952 0.17233 -0.287 0.7741
## n_yearYear 2 -0.22696 0.19598 -1.158 0.2482
## n_yearYear 3 -0.02806 0.18717 -0.150 0.8810
## n_yearYear 4+ -0.36141 0.24502 -1.475 0.1418
## age -0.03234 0.01730 -1.869 0.0631 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9306 on 203 degrees of freedom
## (25 observations deleted due to missingness)
## Multiple R-squared: 0.2043, Adjusted R-squared: 0.1533
## F-statistic: 4.009 on 13 and 203 DF, p-value: 7.618e-06
summary(PHQ_unil1)
##
## Call:
## lm(formula = PHQz ~ unil_z + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.50555 -0.52124 -0.09433 0.44209 2.37189
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.54067 0.35312 1.531 0.1273
## unil_z 0.48522 0.05820 8.337 1.14e-14 ***
## n_disability1 0.66084 0.16566 3.989 9.25e-05 ***
## student.status1 -0.31093 0.14888 -2.089 0.0380 *
## student.status2 -0.22445 0.14927 -1.504 0.1342
## n_orientationSexual Minority 0.11433 0.13394 0.854 0.3943
## n_ethnicity1 0.07560 0.13146 0.575 0.5659
## n_gender1 0.34513 0.46000 0.750 0.4540
## n_gender2 0.19071 0.17497 1.090 0.2770
## UGPG1 0.05570 0.14904 0.374 0.7090
## n_yearYear 2 -0.22935 0.16957 -1.353 0.1777
## n_yearYear 3 0.08876 0.16190 0.548 0.5841
## n_yearYear 4+ -0.20183 0.21267 -0.949 0.3437
## age -0.03526 0.01487 -2.372 0.0186 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8063 on 203 degrees of freedom
## (25 observations deleted due to missingness)
## Multiple R-squared: 0.4027, Adjusted R-squared: 0.3645
## F-statistic: 10.53 on 13 and 203 DF, p-value: < 2.2e-16
summary(PHQ_prel1)
##
## Call:
## lm(formula = PHQz ~ prel_z + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.9695 -0.5612 -0.1168 0.4355 3.1035
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.65344 0.38826 1.683 0.093910 .
## prel_z 0.33032 0.07023 4.703 4.72e-06 ***
## n_disability1 0.65527 0.18519 3.538 0.000499 ***
## student.status1 -0.29653 0.16395 -1.809 0.071977 .
## student.status2 -0.16756 0.16397 -1.022 0.308060
## n_orientationSexual Minority 0.05774 0.15064 0.383 0.701886
## n_ethnicity1 0.01723 0.14534 0.119 0.905750
## n_gender1 -0.01916 0.50834 -0.038 0.969970
## n_gender2 0.15338 0.19301 0.795 0.427739
## UGPG1 -0.01150 0.16364 -0.070 0.944059
## n_yearYear 2 -0.15633 0.18696 -0.836 0.404052
## n_yearYear 3 0.08650 0.17879 0.484 0.629037
## n_yearYear 4+ -0.21540 0.23484 -0.917 0.360116
## age -0.03674 0.01636 -2.246 0.025787 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8871 on 203 degrees of freedom
## (25 observations deleted due to missingness)
## Multiple R-squared: 0.277, Adjusted R-squared: 0.2307
## F-statistic: 5.982 on 13 and 203 DF, p-value: 2.25e-09
summary(PHQ_SA1)
##
## Call:
## lm(formula = PHQz ~ SAz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.74077 -0.58737 -0.05173 0.38523 2.17537
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.302332 0.355378 0.851 0.396
## SAz 0.484253 0.058120 8.332 1.18e-14 ***
## n_disability1 0.659210 0.165712 3.978 9.66e-05 ***
## student.status1 -0.202570 0.149685 -1.353 0.177
## student.status2 -0.137253 0.149013 -0.921 0.358
## n_orientationSexual Minority -0.007719 0.136109 -0.057 0.955
## n_ethnicity1 0.075291 0.131482 0.573 0.568
## n_gender1 0.160804 0.459871 0.350 0.727
## n_gender2 0.064460 0.174070 0.370 0.712
## UGPG1 -0.079785 0.148832 -0.536 0.592
## n_yearYear 2 -0.243196 0.169624 -1.434 0.153
## n_yearYear 3 0.169607 0.162904 1.041 0.299
## n_yearYear 4+ -0.066684 0.214627 -0.311 0.756
## age -0.018799 0.014997 -1.254 0.211
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8064 on 203 degrees of freedom
## (25 observations deleted due to missingness)
## Multiple R-squared: 0.4025, Adjusted R-squared: 0.3642
## F-statistic: 10.52 on 13 and 203 DF, p-value: < 2.2e-16
summary(PHQ_SCI1)
##
## Call:
## lm(formula = PHQz ~ SCInz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.54589 -0.48158 -0.09802 0.41215 2.51670
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.27720 0.32442 0.854 0.39388
## SCInz 0.62585 0.05569 11.238 < 2e-16 ***
## n_disability1 0.46658 0.15450 3.020 0.00286 **
## student.status1 -0.16790 0.13823 -1.215 0.22594
## student.status2 -0.04186 0.13812 -0.303 0.76217
## n_orientationSexual Minority 0.05895 0.12431 0.474 0.63588
## n_ethnicity1 0.04216 0.12124 0.348 0.72843
## n_gender1 0.44520 0.41935 1.062 0.28969
## n_gender2 0.27079 0.15994 1.693 0.09202 .
## UGPG1 -0.01118 0.13608 -0.082 0.93462
## n_yearYear 2 -0.10895 0.15711 -0.693 0.48886
## n_yearYear 3 0.09178 0.14789 0.621 0.53557
## n_yearYear 4+ -0.17995 0.19401 -0.928 0.35477
## age -0.02603 0.01360 -1.914 0.05709 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.7344 on 198 degrees of freedom
## (30 observations deleted due to missingness)
## Multiple R-squared: 0.5112, Adjusted R-squared: 0.4791
## F-statistic: 15.93 on 13 and 198 DF, p-value: < 2.2e-16
summary(PHQ_PS1)
##
## Call:
## lm(formula = PHQz ~ PSz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.49262 -0.46328 -0.02719 0.42726 2.23786
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.43351 0.30093 1.441 0.1513
## PSz 0.69393 0.05242 13.237 <2e-16 ***
## n_disability1 0.34193 0.14475 2.362 0.0191 *
## student.status1 -0.03309 0.12908 -0.256 0.7980
## student.status2 -0.07873 0.12707 -0.620 0.5362
## n_orientationSexual Minority 0.06178 0.11406 0.542 0.5886
## n_ethnicity1 -0.05802 0.11267 -0.515 0.6071
## n_gender1 -0.24682 0.39222 -0.629 0.5299
## n_gender2 0.02600 0.14787 0.176 0.8606
## UGPG1 0.01436 0.12664 0.113 0.9098
## n_yearYear 2 -0.04970 0.14674 -0.339 0.7352
## n_yearYear 3 -0.06301 0.13743 -0.459 0.6471
## n_yearYear 4+ -0.14259 0.18082 -0.789 0.4313
## age -0.02076 0.01269 -1.636 0.1034
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.6848 on 200 degrees of freedom
## (28 observations deleted due to missingness)
## Multiple R-squared: 0.5728, Adjusted R-squared: 0.545
## F-statistic: 20.63 on 13 and 200 DF, p-value: < 2.2e-16
summary(PHQ_wellbeing1)
##
## Call:
## lm(formula = PHQz ~ wellbeingz + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.19650 -0.45149 -0.00361 0.39474 1.82129
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.123090 0.287232 -0.429 0.66872
## wellbeingz -0.721758 0.048192 -14.977 < 2e-16 ***
## n_disability1 0.378479 0.134969 2.804 0.00554 **
## student.status1 0.055210 0.122243 0.452 0.65202
## student.status2 -0.081563 0.119482 -0.683 0.49562
## n_orientationSexual Minority 0.103154 0.106970 0.964 0.33605
## n_ethnicity1 0.091138 0.105415 0.865 0.38831
## n_gender1 0.281026 0.367322 0.765 0.44513
## n_gender2 0.208908 0.139519 1.497 0.13588
## UGPG1 -0.060411 0.119037 -0.508 0.61236
## n_yearYear 2 -0.168542 0.137412 -1.227 0.22144
## n_yearYear 3 0.037198 0.129244 0.288 0.77379
## n_yearYear 4+ -0.053075 0.170560 -0.311 0.75599
## age -0.006772 0.012039 -0.563 0.57437
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.644 on 200 degrees of freedom
## (28 observations deleted due to missingness)
## Multiple R-squared: 0.6222, Adjusted R-squared: 0.5976
## F-statistic: 25.34 on 13 and 200 DF, p-value: < 2.2e-16
summary(PHQ_SC1)
##
## Call:
## lm(formula = PHQz ~ SCz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.6007 -0.6409 -0.2210 0.4899 2.6999
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.586282 0.396556 1.478 0.140842
## SCz -0.225257 0.062009 -3.633 0.000355 ***
## n_disability1 0.837904 0.184278 4.547 9.35e-06 ***
## student.status1 -0.335716 0.167123 -2.009 0.045883 *
## student.status2 -0.191025 0.167704 -1.139 0.256020
## n_orientationSexual Minority 0.161145 0.150546 1.070 0.285707
## n_ethnicity1 0.068075 0.147656 0.461 0.645263
## n_gender1 0.277666 0.516416 0.538 0.591387
## n_gender2 0.052385 0.195405 0.268 0.788907
## UGPG1 -0.031291 0.166934 -0.187 0.851497
## n_yearYear 2 -0.211191 0.190370 -1.109 0.268582
## n_yearYear 3 0.005416 0.181343 0.030 0.976203
## n_yearYear 4+ -0.314910 0.238133 -1.322 0.187519
## age -0.031396 0.016722 -1.878 0.061882 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9052 on 203 degrees of freedom
## (25 observations deleted due to missingness)
## Multiple R-squared: 0.2471, Adjusted R-squared: 0.1989
## F-statistic: 5.126 on 13 and 203 DF, p-value: 7.489e-08
summary(PHQ_perfectionism1)
##
## Call:
## lm(formula = PHQz ~ perfectionismz + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.5940 -0.5659 -0.1811 0.4530 2.5044
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.408714 0.384884 1.062 0.289568
## perfectionismz 0.352681 0.061596 5.726 3.78e-08 ***
## n_disability1 0.661932 0.181779 3.641 0.000346 ***
## student.status1 -0.311502 0.163013 -1.911 0.057462 .
## student.status2 -0.127646 0.163373 -0.781 0.435548
## n_orientationSexual Minority 0.137162 0.146993 0.933 0.351892
## n_ethnicity1 0.074300 0.143666 0.517 0.605613
## n_gender1 0.509068 0.498984 1.020 0.308874
## n_gender2 0.123814 0.188597 0.657 0.512262
## UGPG1 0.009881 0.161442 0.061 0.951257
## n_yearYear 2 -0.217217 0.185808 -1.169 0.243793
## n_yearYear 3 0.061866 0.175400 0.353 0.724678
## n_yearYear 4+ -0.255310 0.229825 -1.111 0.267963
## age -0.027517 0.016153 -1.704 0.090031 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8706 on 198 degrees of freedom
## (30 observations deleted due to missingness)
## Multiple R-squared: 0.3131, Adjusted R-squared: 0.268
## F-statistic: 6.943 on 13 and 198 DF, p-value: 5.324e-11
summary(PHQ_aca1)
##
## Call:
## lm(formula = PHQz ~ SE_aca_z + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.8848 -0.5862 -0.1121 0.4608 2.3910
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.41780 0.36891 1.133 0.25874
## SE_aca_z -0.45850 0.06592 -6.956 4.72e-11 ***
## n_disability1 0.61966 0.17402 3.561 0.00046 ***
## student.status1 -0.26138 0.15532 -1.683 0.09393 .
## student.status2 -0.20739 0.15536 -1.335 0.18342
## n_orientationSexual Minority 0.20504 0.13886 1.477 0.14134
## n_ethnicity1 -0.24264 0.14473 -1.677 0.09517 .
## n_gender1 0.31294 0.47887 0.654 0.51417
## n_gender2 0.16422 0.18208 0.902 0.36819
## UGPG1 0.05284 0.15527 0.340 0.73398
## n_yearYear 2 -0.25638 0.17665 -1.451 0.14823
## n_yearYear 3 -0.08103 0.16848 -0.481 0.63109
## n_yearYear 4+ -0.32083 0.22073 -1.453 0.14764
## age -0.02167 0.01560 -1.389 0.16632
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8395 on 203 degrees of freedom
## (25 observations deleted due to missingness)
## Multiple R-squared: 0.3525, Adjusted R-squared: 0.311
## F-statistic: 8.501 on 13 and 203 DF, p-value: 1.111e-13
summary(PHQ_fi1)
##
## Call:
## lm(formula = PHQz ~ SE_fi_z + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.7816 -0.6345 -0.1404 0.5734 2.3035
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.61406 0.38308 1.603 0.1105
## SE_fi_z 0.33218 0.06243 5.321 2.72e-07 ***
## n_disability1 0.78353 0.17855 4.388 1.84e-05 ***
## student.status1 -0.28213 0.16184 -1.743 0.0828 .
## student.status2 -0.17171 0.16178 -1.061 0.2898
## n_orientationSexual Minority 0.12165 0.14588 0.834 0.4053
## n_ethnicity1 0.09810 0.14271 0.687 0.4926
## n_gender1 0.36586 0.49978 0.732 0.4650
## n_gender2 0.16852 0.19045 0.885 0.3773
## UGPG1 0.11820 0.16378 0.722 0.4713
## n_yearYear 2 -0.20612 0.18405 -1.120 0.2641
## n_yearYear 3 0.10797 0.17661 0.611 0.5417
## n_yearYear 4+ -0.16551 0.23254 -0.712 0.4775
## age -0.04120 0.01618 -2.547 0.0116 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8751 on 203 degrees of freedom
## (25 observations deleted due to missingness)
## Multiple R-squared: 0.2963, Adjusted R-squared: 0.2513
## F-statistic: 6.576 on 13 and 203 DF, p-value: 2.052e-10
summary(PHQ_acc1)
##
## Call:
## lm(formula = PHQz ~ SE_acc_z + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.8848 -0.5862 -0.1121 0.4608 2.3910
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.41780 0.36891 1.133 0.25874
## SE_acc_z -0.45850 0.06592 -6.956 4.72e-11 ***
## n_disability1 0.61966 0.17402 3.561 0.00046 ***
## student.status1 -0.26138 0.15532 -1.683 0.09393 .
## student.status2 -0.20739 0.15536 -1.335 0.18342
## n_orientationSexual Minority 0.20504 0.13886 1.477 0.14134
## n_ethnicity1 -0.24264 0.14473 -1.677 0.09517 .
## n_gender1 0.31294 0.47887 0.654 0.51417
## n_gender2 0.16422 0.18208 0.902 0.36819
## UGPG1 0.05284 0.15527 0.340 0.73398
## n_yearYear 2 -0.25638 0.17665 -1.451 0.14823
## n_yearYear 3 -0.08103 0.16848 -0.481 0.63109
## n_yearYear 4+ -0.32083 0.22073 -1.453 0.14764
## age -0.02167 0.01560 -1.389 0.16632
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8395 on 203 degrees of freedom
## (25 observations deleted due to missingness)
## Multiple R-squared: 0.3525, Adjusted R-squared: 0.311
## F-statistic: 8.501 on 13 and 203 DF, p-value: 1.111e-13
summary(PHQ_fr1)
##
## Call:
## lm(formula = PHQz ~ SE_fr_z + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.8316 -0.5459 -0.1510 0.4541 2.6344
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.42199 0.37884 1.114 0.2666
## SE_fr_z -0.36172 0.06043 -5.985 9.65e-09 ***
## n_disability1 0.89356 0.17547 5.092 8.05e-07 ***
## student.status1 -0.41033 0.15954 -2.572 0.0108 *
## student.status2 -0.26202 0.16030 -1.635 0.1037
## n_orientationSexual Minority 0.13485 0.14313 0.942 0.3473
## n_ethnicity1 0.08484 0.14042 0.604 0.5464
## n_gender1 0.32621 0.49143 0.664 0.5076
## n_gender2 0.19109 0.18763 1.018 0.3097
## UGPG1 -0.10259 0.15929 -0.644 0.5203
## n_yearYear 2 -0.23836 0.18117 -1.316 0.1898
## n_yearYear 3 0.04622 0.17274 0.268 0.7893
## n_yearYear 4+ -0.21006 0.22755 -0.923 0.3570
## age -0.02798 0.01593 -1.757 0.0804 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8613 on 203 degrees of freedom
## (25 observations deleted due to missingness)
## Multiple R-squared: 0.3185, Adjusted R-squared: 0.2748
## F-statistic: 7.296 on 13 and 203 DF, p-value: 1.173e-11
summary(PHQ_co1)
##
## Call:
## lm(formula = PHQz ~ SE_co_z + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.9065 -0.6173 -0.1693 0.4830 2.8025
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.78193 0.40638 1.924 0.0558 .
## SE_co_z -0.15186 0.06830 -2.223 0.0273 *
## n_disability1 0.88469 0.19311 4.581 8.24e-06 ***
## student.status1 -0.22837 0.17421 -1.311 0.1915
## student.status2 -0.08168 0.17837 -0.458 0.6475
## n_orientationSexual Minority 0.16009 0.15592 1.027 0.3058
## n_ethnicity1 0.10773 0.15337 0.702 0.4833
## n_gender1 0.13119 0.52499 0.250 0.8029
## n_gender2 0.03399 0.20184 0.168 0.8664
## UGPG1 -0.06955 0.17101 -0.407 0.6847
## n_yearYear 2 -0.16955 0.19335 -0.877 0.3816
## n_yearYear 3 0.04867 0.19384 0.251 0.8020
## n_yearYear 4+ -0.24012 0.24282 -0.989 0.3240
## age -0.04315 0.01707 -2.527 0.0123 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.915 on 195 degrees of freedom
## (33 observations deleted due to missingness)
## Multiple R-squared: 0.2295, Adjusted R-squared: 0.1782
## F-statistic: 4.468 on 13 and 195 DF, p-value: 1.225e-06
summary(PHQ_GAD2)
##
## Call:
## lm(formula = PHQz ~ GADz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age + SE_fi_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.71567 -0.36453 -0.05634 0.30811 2.04225
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.344254 0.270951 1.271 0.20535
## GADz 0.691344 0.048198 14.344 < 2e-16 ***
## n_disability1 0.285016 0.130692 2.181 0.03035 *
## student.status1 -0.097417 0.114915 -0.848 0.39759
## student.status2 -0.115527 0.114214 -1.011 0.31299
## n_orientationSexual Minority -0.037657 0.103531 -0.364 0.71644
## n_ethnicity1 0.108853 0.100695 1.081 0.28097
## n_gender1 0.544893 0.352860 1.544 0.12410
## n_gender2 0.018140 0.134791 0.135 0.89308
## UGPG1 0.008977 0.115809 0.078 0.93829
## n_yearYear 2 0.031177 0.130913 0.238 0.81201
## n_yearYear 3 0.309962 0.125409 2.472 0.01428 *
## n_yearYear 4+ 0.221938 0.166288 1.335 0.18349
## age -0.022385 0.011489 -1.948 0.05275 .
## SE_fi_z 0.143373 0.045975 3.118 0.00208 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.6175 on 202 degrees of freedom
## (25 observations deleted due to missingness)
## Multiple R-squared: 0.6514, Adjusted R-squared: 0.6272
## F-statistic: 26.96 on 14 and 202 DF, p-value: < 2.2e-16
summary(PHQ_CUDIT2)
##
## Call:
## lm(formula = PHQz ~ CUDITz + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age + SE_fi_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.53446 -0.50263 -0.07184 0.39489 2.12722
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.19501 0.56608 0.344 0.73132
## CUDITz 0.09189 0.08791 1.045 0.29879
## n_disability1 0.69218 0.21383 3.237 0.00172 **
## student.status1 -0.49852 0.20050 -2.486 0.01484 *
## student.status2 -0.05343 0.22518 -0.237 0.81302
## n_orientationSexual Minority 0.20396 0.18201 1.121 0.26558
## n_ethnicity1 -0.02980 0.19163 -0.155 0.87680
## n_gender1 1.54730 0.86433 1.790 0.07695 .
## n_gender2 0.22711 0.25132 0.904 0.36870
## UGPG1 0.29878 0.23501 1.271 0.20702
## n_yearYear 2 0.10301 0.23499 0.438 0.66222
## n_yearYear 3 0.16712 0.24051 0.695 0.48901
## n_yearYear 4+ 0.22766 0.31804 0.716 0.47605
## age -0.03115 0.02399 -1.298 0.19764
## SE_fi_z 0.35364 0.08234 4.295 4.58e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.7706 on 86 degrees of freedom
## (141 observations deleted due to missingness)
## Multiple R-squared: 0.4219, Adjusted R-squared: 0.3278
## F-statistic: 4.483 on 14 and 86 DF, p-value: 5.617e-06
summary(PHQ_AUDIT2)
##
## Call:
## lm(formula = PHQz ~ AUDITz + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age + SE_fi_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.7126 -0.6512 -0.1392 0.5919 2.3658
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.55586 0.38697 1.436 0.1524
## AUDITz 0.06450 0.06142 1.050 0.2949
## n_disability1 0.78803 0.17856 4.413 1.66e-05 ***
## student.status1 -0.27864 0.16183 -1.722 0.0866 .
## student.status2 -0.16120 0.16204 -0.995 0.3210
## n_orientationSexual Minority 0.11168 0.14615 0.764 0.4457
## n_ethnicity1 0.10827 0.14300 0.757 0.4499
## n_gender1 0.35255 0.49981 0.705 0.4814
## n_gender2 0.18603 0.19113 0.973 0.3316
## UGPG1 0.10126 0.16453 0.615 0.5390
## n_yearYear 2 -0.21629 0.18426 -1.174 0.2418
## n_yearYear 3 0.09001 0.17739 0.507 0.6124
## n_yearYear 4+ -0.18036 0.23291 -0.774 0.4396
## age -0.03892 0.01632 -2.385 0.0180 *
## SE_fi_z 0.32877 0.06250 5.260 3.65e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8749 on 202 degrees of freedom
## (25 observations deleted due to missingness)
## Multiple R-squared: 0.3001, Adjusted R-squared: 0.2516
## F-statistic: 6.188 on 14 and 202 DF, p-value: 3.383e-10
summary(PHQ_unil2)
##
## Call:
## lm(formula = PHQz ~ unil_z + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age + SE_fi_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.61977 -0.51099 -0.08458 0.39962 2.07146
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.52040 0.33394 1.558 0.120709
## unil_z 0.44909 0.05550 8.091 5.43e-14 ***
## n_disability1 0.62091 0.15685 3.959 0.000104 ***
## student.status1 -0.27135 0.14100 -1.924 0.055698 .
## student.status2 -0.23908 0.14118 -1.693 0.091915 .
## n_orientationSexual Minority 0.04218 0.12747 0.331 0.741039
## n_ethnicity1 0.08746 0.12433 0.703 0.482571
## n_gender1 0.45743 0.43555 1.050 0.294865
## n_gender2 0.28693 0.16657 1.723 0.086494 .
## UGPG1 0.17181 0.14283 1.203 0.230428
## n_yearYear 2 -0.22152 0.16035 -1.381 0.168677
## n_yearYear 3 0.17655 0.15410 1.146 0.253279
## n_yearYear 4+ -0.06419 0.20298 -0.316 0.752141
## age -0.04026 0.01409 -2.857 0.004724 **
## SE_fi_z 0.27443 0.05486 5.003 1.23e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.7624 on 202 degrees of freedom
## (25 observations deleted due to missingness)
## Multiple R-squared: 0.4686, Adjusted R-squared: 0.4317
## F-statistic: 12.72 on 14 and 202 DF, p-value: < 2.2e-16
summary(PHQ_prel2)
##
## Call:
## lm(formula = PHQz ~ prel_z + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age + SE_fi_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.9226 -0.5607 -0.0937 0.5448 2.7125
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.61872 0.36090 1.714 0.087989 .
## prel_z 0.33748 0.06528 5.169 5.63e-07 ***
## n_disability1 0.58466 0.17256 3.388 0.000846 ***
## student.status1 -0.24509 0.15263 -1.606 0.109890
## student.status2 -0.19313 0.15246 -1.267 0.206703
## n_orientationSexual Minority -0.04412 0.14113 -0.313 0.754875
## n_ethnicity1 0.02957 0.13509 0.219 0.826982
## n_gender1 0.12562 0.47313 0.266 0.790895
## n_gender2 0.28833 0.18092 1.594 0.112558
## UGPG1 0.13978 0.15435 0.906 0.366233
## n_yearYear 2 -0.14681 0.17377 -0.845 0.399180
## n_yearYear 3 0.20541 0.16745 1.227 0.221367
## n_yearYear 4+ -0.02996 0.22064 -0.136 0.892122
## age -0.04295 0.01524 -2.818 0.005320 **
## SE_fi_z 0.33798 0.05883 5.745 3.34e-08 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8245 on 202 degrees of freedom
## (25 observations deleted due to missingness)
## Multiple R-squared: 0.3785, Adjusted R-squared: 0.3355
## F-statistic: 8.788 on 14 and 202 DF, p-value: 8.019e-15
summary(PHQ_SA2)
##
## Call:
## lm(formula = PHQz ~ SAz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age + SE_fi_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.5982 -0.5251 -0.0686 0.4351 2.1079
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.30608 0.33820 0.905 0.366532
## SAz 0.44135 0.05606 7.873 2.08e-13 ***
## n_disability1 0.62469 0.15787 3.957 0.000105 ***
## student.status1 -0.17488 0.14257 -1.227 0.221382
## student.status2 -0.15753 0.14187 -1.110 0.268161
## n_orientationSexual Minority -0.06371 0.13007 -0.490 0.624821
## n_ethnicity1 0.08677 0.12515 0.693 0.488903
## n_gender1 0.28175 0.43839 0.643 0.521151
## n_gender2 0.16449 0.16701 0.985 0.325847
## UGPG1 0.04119 0.14395 0.286 0.775080
## n_yearYear 2 -0.23425 0.16143 -1.451 0.148319
## n_yearYear 3 0.24428 0.15584 1.568 0.118562
## n_yearYear 4+ 0.04977 0.20574 0.242 0.809112
## age -0.02501 0.01433 -1.745 0.082465 .
## SE_fi_z 0.26114 0.05549 4.706 4.67e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.7674 on 202 degrees of freedom
## (25 observations deleted due to missingness)
## Multiple R-squared: 0.4616, Adjusted R-squared: 0.4242
## F-statistic: 12.37 on 14 and 202 DF, p-value: < 2.2e-16
summary(PHQ_SCI2)
##
## Call:
## lm(formula = PHQz ~ SCInz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age + SE_fi_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.44748 -0.45327 -0.09685 0.34318 2.30842
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.28251 0.31546 0.896 0.371583
## SCInz 0.57192 0.05627 10.163 < 2e-16 ***
## n_disability1 0.46536 0.15023 3.098 0.002236 **
## student.status1 -0.14802 0.13453 -1.100 0.272540
## student.status2 -0.07819 0.13470 -0.580 0.562262
## n_orientationSexual Minority 0.01221 0.12160 0.100 0.920115
## n_ethnicity1 0.05649 0.11797 0.479 0.632570
## n_gender1 0.50695 0.40815 1.242 0.215684
## n_gender2 0.32489 0.15628 2.079 0.038926 *
## UGPG1 0.07590 0.13461 0.564 0.573508
## n_yearYear 2 -0.11051 0.15278 -0.723 0.470310
## n_yearYear 3 0.15227 0.14482 1.051 0.294372
## n_yearYear 4+ -0.08929 0.19040 -0.469 0.639609
## age -0.03006 0.01328 -2.264 0.024649 *
## SE_fi_z 0.18938 0.05377 3.522 0.000533 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.7141 on 197 degrees of freedom
## (30 observations deleted due to missingness)
## Multiple R-squared: 0.5401, Adjusted R-squared: 0.5075
## F-statistic: 16.53 on 14 and 197 DF, p-value: < 2.2e-16
summary(PHQ_PS2)
##
## Call:
## lm(formula = PHQz ~ PSz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age + SE_fi_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.34992 -0.40792 0.01846 0.40110 2.09464
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.431167 0.293958 1.467 0.14402
## PSz 0.645065 0.053363 12.088 < 2e-16 ***
## n_disability1 0.345003 0.141398 2.440 0.01557 *
## student.status1 -0.027692 0.126103 -0.220 0.82641
## student.status2 -0.099548 0.124292 -0.801 0.42413
## n_orientationSexual Minority 0.025525 0.111970 0.228 0.81991
## n_ethnicity1 -0.044041 0.110138 -0.400 0.68968
## n_gender1 -0.144045 0.384432 -0.375 0.70829
## n_gender2 0.090838 0.145809 0.623 0.53400
## UGPG1 0.085932 0.125647 0.684 0.49483
## n_yearYear 2 -0.054724 0.143351 -0.382 0.70306
## n_yearYear 3 -0.001642 0.135560 -0.012 0.99035
## n_yearYear 4+ -0.068689 0.178084 -0.386 0.70012
## age -0.024717 0.012456 -1.984 0.04859 *
## SE_fi_z 0.163321 0.050161 3.256 0.00133 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.6689 on 199 degrees of freedom
## (28 observations deleted due to missingness)
## Multiple R-squared: 0.5944, Adjusted R-squared: 0.5658
## F-statistic: 20.83 on 14 and 199 DF, p-value: < 2.2e-16
summary(PHQ_wellbeing2)
##
## Call:
## lm(formula = PHQz ~ wellbeingz + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age + SE_fi_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.38607 -0.43672 -0.02793 0.44342 1.70940
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.091895 0.281685 -0.326 0.74459
## wellbeingz -0.678139 0.049364 -13.737 < 2e-16 ***
## n_disability1 0.378096 0.132275 2.858 0.00471 **
## student.status1 0.055125 0.119803 0.460 0.64592
## student.status2 -0.099669 0.117248 -0.850 0.39631
## n_orientationSexual Minority 0.068373 0.105458 0.648 0.51751
## n_ethnicity1 0.094206 0.103316 0.912 0.36296
## n_gender1 0.339047 0.360495 0.941 0.34810
## n_gender2 0.255087 0.137576 1.854 0.06520 .
## UGPG1 0.007400 0.118776 0.062 0.95039
## n_yearYear 2 -0.165464 0.134673 -1.229 0.22066
## n_yearYear 3 0.085253 0.127648 0.668 0.50499
## n_yearYear 4+ 0.007135 0.168326 0.042 0.96623
## age -0.011085 0.011883 -0.933 0.35206
## SE_fi_z 0.144215 0.047467 3.038 0.00270 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.6311 on 199 degrees of freedom
## (28 observations deleted due to missingness)
## Multiple R-squared: 0.6389, Adjusted R-squared: 0.6135
## F-statistic: 25.15 on 14 and 199 DF, p-value: < 2.2e-16
summary(PHQ_SC2)
##
## Call:
## lm(formula = PHQz ~ SCz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age + SE_fi_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.6484 -0.6483 -0.1455 0.5402 2.2208
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.57101 0.37701 1.515 0.13144
## SCz -0.16930 0.06011 -2.816 0.00534 **
## n_disability1 0.78212 0.17558 4.454 1.39e-05 ***
## student.status1 -0.29015 0.15917 -1.823 0.06980 .
## student.status2 -0.20222 0.15945 -1.268 0.20617
## n_orientationSexual Minority 0.08870 0.14393 0.616 0.53840
## n_ethnicity1 0.08431 0.14042 0.600 0.54887
## n_gender1 0.39501 0.49157 0.804 0.42259
## n_gender2 0.16556 0.18729 0.884 0.37776
## UGPG1 0.10188 0.16115 0.632 0.52796
## n_yearYear 2 -0.20467 0.18099 -1.131 0.25945
## n_yearYear 3 0.10530 0.17367 0.606 0.54500
## n_yearYear 4+ -0.16153 0.22867 -0.706 0.48076
## age -0.03776 0.01595 -2.367 0.01889 *
## SE_fi_z 0.29767 0.06260 4.755 3.77e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8606 on 202 degrees of freedom
## (25 observations deleted due to missingness)
## Multiple R-squared: 0.3229, Adjusted R-squared: 0.276
## F-statistic: 6.881 on 14 and 202 DF, p-value: 1.831e-11
summary(PHQ_perfectionism2)
##
## Call:
## lm(formula = PHQz ~ perfectionismz + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age + SE_fi_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.8874 -0.5798 -0.1561 0.4790 2.1946
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.40126 0.36617 1.096 0.274487
## perfectionismz 0.30477 0.05949 5.123 7.15e-07 ***
## n_disability1 0.63617 0.17303 3.677 0.000305 ***
## student.status1 -0.26321 0.15543 -1.693 0.091956 .
## student.status2 -0.17123 0.15571 -1.100 0.272823
## n_orientationSexual Minority 0.05722 0.14089 0.406 0.685101
## n_ethnicity1 0.09183 0.13673 0.672 0.502615
## n_gender1 0.59166 0.47505 1.245 0.214438
## n_gender2 0.22345 0.18069 1.237 0.217697
## UGPG1 0.13758 0.15601 0.882 0.378915
## n_yearYear 2 -0.20567 0.17679 -1.163 0.246090
## n_yearYear 3 0.15607 0.16809 0.928 0.354288
## n_yearYear 4+ -0.11004 0.22085 -0.498 0.618869
## age -0.03342 0.01542 -2.168 0.031392 *
## SE_fi_z 0.28420 0.06093 4.665 5.70e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8283 on 197 degrees of freedom
## (30 observations deleted due to missingness)
## Multiple R-squared: 0.3814, Adjusted R-squared: 0.3375
## F-statistic: 8.677 on 14 and 197 DF, p-value: 1.506e-14
summary(PHQ_aca2)
##
## Call:
## lm(formula = PHQz ~ SE_aca_z + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age + SE_fi_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.6666 -0.5387 -0.1146 0.4709 2.2167
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.43003 0.35684 1.205 0.229567
## SE_aca_z -0.38628 0.06643 -5.815 2.34e-08 ***
## n_disability1 0.60984 0.16834 3.623 0.000369 ***
## student.status1 -0.23747 0.15035 -1.579 0.115812
## student.status2 -0.21525 0.15029 -1.432 0.153616
## n_orientationSexual Minority 0.13912 0.13539 1.028 0.305373
## n_ethnicity1 -0.18157 0.14087 -1.289 0.198897
## n_gender1 0.40171 0.46375 0.866 0.387400
## n_gender2 0.23596 0.17709 1.332 0.184223
## UGPG1 0.14407 0.15202 0.948 0.344414
## n_yearYear 2 -0.24403 0.17089 -1.428 0.154837
## n_yearYear 3 0.01145 0.16470 0.069 0.944666
## n_yearYear 4+ -0.19839 0.21583 -0.919 0.359103
## age -0.02806 0.01518 -1.848 0.065998 .
## SE_fi_z 0.23363 0.06035 3.871 0.000146 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.812 on 202 degrees of freedom
## (25 observations deleted due to missingness)
## Multiple R-squared: 0.3972, Adjusted R-squared: 0.3554
## F-statistic: 9.508 on 14 and 202 DF, p-value: 4.869e-16
summary(PHQ_acc2)
##
## Call:
## lm(formula = PHQz ~ SE_acc_z + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age + SE_fi_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.6666 -0.5387 -0.1146 0.4709 2.2167
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.43003 0.35684 1.205 0.229567
## SE_acc_z -0.38628 0.06643 -5.815 2.34e-08 ***
## n_disability1 0.60984 0.16834 3.623 0.000369 ***
## student.status1 -0.23747 0.15035 -1.579 0.115812
## student.status2 -0.21525 0.15029 -1.432 0.153616
## n_orientationSexual Minority 0.13912 0.13539 1.028 0.305373
## n_ethnicity1 -0.18157 0.14087 -1.289 0.198897
## n_gender1 0.40171 0.46375 0.866 0.387400
## n_gender2 0.23596 0.17709 1.332 0.184223
## UGPG1 0.14407 0.15202 0.948 0.344414
## n_yearYear 2 -0.24403 0.17089 -1.428 0.154837
## n_yearYear 3 0.01145 0.16470 0.069 0.944666
## n_yearYear 4+ -0.19839 0.21583 -0.919 0.359103
## age -0.02806 0.01518 -1.848 0.065998 .
## SE_fi_z 0.23363 0.06035 3.871 0.000146 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.812 on 202 degrees of freedom
## (25 observations deleted due to missingness)
## Multiple R-squared: 0.3972, Adjusted R-squared: 0.3554
## F-statistic: 9.508 on 14 and 202 DF, p-value: 4.869e-16
summary(PHQ_fr2)
##
## Call:
## lm(formula = PHQz ~ SE_fr_z + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age + SE_fi_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.9692 -0.5525 -0.1070 0.4926 2.3713
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.39811 0.35420 1.124 0.2624
## SE_fr_z -0.34778 0.05655 -6.149 4.09e-09 ***
## n_disability1 0.82967 0.16445 5.045 1.01e-06 ***
## student.status1 -0.35989 0.14943 -2.408 0.0169 *
## student.status2 -0.28110 0.14990 -1.875 0.0622 .
## n_orientationSexual Minority 0.04597 0.13478 0.341 0.7334
## n_ethnicity1 0.09774 0.13130 0.744 0.4575
## n_gender1 0.46238 0.46009 1.005 0.3161
## n_gender2 0.30919 0.17671 1.750 0.0817 .
## UGPG1 0.04141 0.15120 0.274 0.7844
## n_yearYear 2 -0.22970 0.16938 -1.356 0.1766
## n_yearYear 3 0.15358 0.16266 0.944 0.3462
## n_yearYear 4+ -0.04431 0.21485 -0.206 0.8368
## age -0.03403 0.01493 -2.280 0.0237 *
## SE_fi_z 0.31635 0.05750 5.502 1.13e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8052 on 202 degrees of freedom
## (25 observations deleted due to missingness)
## Multiple R-squared: 0.4073, Adjusted R-squared: 0.3662
## F-statistic: 9.915 on 14 and 202 DF, p-value: < 2.2e-16
summary(PHQ_co2)
##
## Call:
## lm(formula = PHQz ~ SE_co_z + n_disability + student.status +
## n_orientation + n_ethnicity + n_gender + UGPG + n_year +
## age + SE_fi_z, data = pass)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.8658 -0.6230 -0.1332 0.5583 2.4207
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.70740 0.38303 1.847 0.0663 .
## SE_co_z -0.13333 0.06443 -2.069 0.0398 *
## n_disability1 0.83965 0.18210 4.611 7.26e-06 ***
## student.status1 -0.18523 0.16430 -1.127 0.2610
## student.status2 -0.10770 0.16807 -0.641 0.5224
## n_orientationSexual Minority 0.08520 0.14759 0.577 0.5644
## n_ethnicity1 0.12156 0.14448 0.841 0.4012
## n_gender1 0.26703 0.49518 0.539 0.5903
## n_gender2 0.16794 0.19192 0.875 0.3826
## UGPG1 0.07893 0.16369 0.482 0.6302
## n_yearYear 2 -0.17017 0.18211 -0.934 0.3512
## n_yearYear 3 0.15441 0.18375 0.840 0.4018
## n_yearYear 4+ -0.07911 0.23088 -0.343 0.7322
## age -0.04762 0.01611 -2.957 0.0035 **
## SE_fi_z 0.31704 0.06238 5.082 8.74e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8618 on 194 degrees of freedom
## (33 observations deleted due to missingness)
## Multiple R-squared: 0.3201, Adjusted R-squared: 0.271
## F-statistic: 6.523 on 14 and 194 DF, p-value: 9.903e-11
anova(PHQ_aca1, PHQ_aca2)
## Analysis of Variance Table
##
## Model 1: PHQz ~ SE_aca_z + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age
## Model 2: PHQz ~ SE_aca_z + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age + SE_fi_z
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 203 143.06
## 2 202 133.18 1 9.8798 14.986 0.0001462 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(PHQ_acc1, PHQ_acc2)
## Analysis of Variance Table
##
## Model 1: PHQz ~ SE_acc_z + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age
## Model 2: PHQz ~ SE_acc_z + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age + SE_fi_z
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 203 143.06
## 2 202 133.18 1 9.8798 14.986 0.0001462 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(PHQ_co1, PHQ_co2)
## Analysis of Variance Table
##
## Model 1: PHQz ~ SE_co_z + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age
## Model 2: PHQz ~ SE_co_z + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age + SE_fi_z
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 195 163.25
## 2 194 144.07 1 19.182 25.83 8.74e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(PHQ_fr1, PHQ_fr2)
## Analysis of Variance Table
##
## Model 1: PHQz ~ SE_fr_z + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age
## Model 2: PHQz ~ SE_fr_z + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age + SE_fi_z
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 203 150.58
## 2 202 130.95 1 19.625 30.272 1.129e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(PHQ_GAD1, PHQ_GAD2)
## Analysis of Variance Table
##
## Model 1: PHQz ~ GADz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age
## Model 2: PHQz ~ GADz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age + SE_fi_z
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 203 80.728
## 2 202 77.020 1 3.708 9.7249 0.002083 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(PHQ_CUDIT1, PHQ_CUDIT2)
## Analysis of Variance Table
##
## Model 1: PHQz ~ CUDITz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age
## Model 2: PHQz ~ CUDITz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age + SE_fi_z
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 87 62.021
## 2 86 51.068 1 10.953 18.445 4.578e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(PHQ_AUDIT1, PHQ_AUDIT2)
## Analysis of Variance Table
##
## Model 1: PHQz ~ AUDITz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age
## Model 2: PHQz ~ AUDITz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age + SE_fi_z
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 203 175.81
## 2 202 154.62 1 21.181 27.671 3.654e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(PHQ_unil1, PHQ_unil2)
## Analysis of Variance Table
##
## Model 1: PHQz ~ unil_z + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age
## Model 2: PHQz ~ unil_z + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age + SE_fi_z
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 203 131.96
## 2 202 117.42 1 14.548 25.028 1.225e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(PHQ_prel1, PHQ_prel2)
## Analysis of Variance Table
##
## Model 1: PHQz ~ prel_z + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age
## Model 2: PHQz ~ prel_z + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age + SE_fi_z
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 203 159.74
## 2 202 137.31 1 22.438 33.01 3.339e-08 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(PHQ_SA1, PHQ_SA2)
## Analysis of Variance Table
##
## Model 1: PHQz ~ SAz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age
## Model 2: PHQz ~ SAz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age + SE_fi_z
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 203 132.01
## 2 202 118.96 1 13.045 22.151 4.674e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(PHQ_SCI1, PHQ_SCI2)
## Analysis of Variance Table
##
## Model 1: PHQz ~ SCInz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age
## Model 2: PHQz ~ SCInz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age + SE_fi_z
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 198 106.80
## 2 197 100.47 1 6.3256 12.403 0.0005326 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(PHQ_PS1, PHQ_PS2)
## Analysis of Variance Table
##
## Model 1: PHQz ~ PSz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age
## Model 2: PHQz ~ PSz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age + SE_fi_z
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 200 93.784
## 2 199 89.041 1 4.7434 10.601 0.001328 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(PHQ_wellbeing1, PHQ_wellbeing2)
## Analysis of Variance Table
##
## Model 1: PHQz ~ wellbeingz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age
## Model 2: PHQz ~ wellbeingz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age + SE_fi_z
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 200 82.936
## 2 199 79.259 1 3.6765 9.2309 0.002699 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(PHQ_SC1, PHQ_SC2)
## Analysis of Variance Table
##
## Model 1: PHQz ~ SCz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age
## Model 2: PHQz ~ SCz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age + SE_fi_z
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 203 166.34
## 2 202 149.59 1 16.743 22.609 3.77e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(PHQ_perfectionism1, PHQ_perfectionism2)
## Analysis of Variance Table
##
## Model 1: PHQz ~ perfectionismz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age
## Model 2: PHQz ~ perfectionismz + n_disability + student.status + n_orientation +
## n_ethnicity + n_gender + UGPG + n_year + age + SE_fi_z
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 198 150.07
## 2 197 135.15 1 14.927 21.759 5.696e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#### assumption check PHQ####
car::Anova( PHQ_aca2, type=3)
## Anova Table (Type III tests)
##
## Response: PHQz
## Sum Sq Df F value Pr(>F)
## (Intercept) 0.957 1 1.4523 0.2295670
## SE_aca_z 22.291 1 33.8112 2.345e-08 ***
## n_disability 8.653 1 13.1239 0.0003688 ***
## student.status 2.436 2 1.8474 0.1603070
## n_orientation 0.696 1 1.0559 0.3053728
## n_ethnicity 1.095 1 1.6613 0.1988974
## n_gender 1.308 2 0.9922 0.3725757
## UGPG 0.592 1 0.8981 0.3444136
## n_year 1.833 3 0.9269 0.4287166
## age 2.253 1 3.4168 0.0659980 .
## SE_fi_z 9.880 1 14.9855 0.0001462 ***
## Residuals 133.177 202
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
car::Anova(PHQ_acc2, type=3)
## Anova Table (Type III tests)
##
## Response: PHQz
## Sum Sq Df F value Pr(>F)
## (Intercept) 0.957 1 1.4523 0.2295670
## SE_acc_z 22.291 1 33.8112 2.345e-08 ***
## n_disability 8.653 1 13.1239 0.0003688 ***
## student.status 2.436 2 1.8474 0.1603070
## n_orientation 0.696 1 1.0559 0.3053728
## n_ethnicity 1.095 1 1.6613 0.1988974
## n_gender 1.308 2 0.9922 0.3725757
## UGPG 0.592 1 0.8981 0.3444136
## n_year 1.833 3 0.9269 0.4287166
## age 2.253 1 3.4168 0.0659980 .
## SE_fi_z 9.880 1 14.9855 0.0001462 ***
## Residuals 133.177 202
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
car::Anova(PHQ_co2, type=3)
## Anova Table (Type III tests)
##
## Response: PHQz
## Sum Sq Df F value Pr(>F)
## (Intercept) 2.533 1 3.4110 0.066287 .
## SE_co_z 3.180 1 4.2820 0.039843 *
## n_disability 15.790 1 21.2613 7.26e-06 ***
## student.status 1.062 2 0.7153 0.490309
## n_orientation 0.247 1 0.3332 0.564427
## n_ethnicity 0.526 1 0.7079 0.401182
## n_gender 0.623 2 0.4191 0.658220
## UGPG 0.173 1 0.2325 0.630220
## n_year 1.698 3 0.7620 0.516675
## age 6.492 1 8.7415 0.003497 **
## SE_fi_z 19.182 1 25.8299 8.74e-07 ***
## Residuals 144.073 194
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
car::Anova(PHQ_fr2, type=3)
## Anova Table (Type III tests)
##
## Response: PHQz
## Sum Sq Df F value Pr(>F)
## (Intercept) 0.819 1 1.2633 0.26236
## SE_fr_z 24.516 1 37.8163 4.091e-09 ***
## n_disability 16.501 1 25.4533 1.007e-06 ***
## student.status 4.907 2 3.7849 0.02434 *
## n_orientation 0.075 1 0.1163 0.73339
## n_ethnicity 0.359 1 0.5541 0.45750
## n_gender 2.121 2 1.6355 0.19743
## UGPG 0.049 1 0.0750 0.78444
## n_year 2.399 3 1.2335 0.29862
## age 3.369 1 5.1973 0.02367 *
## SE_fi_z 19.625 1 30.2723 1.129e-07 ***
## Residuals 130.953 202
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
car::Anova(PHQ_GAD2, type=3)
## Anova Table (Type III tests)
##
## Response: PHQz
## Sum Sq Df F value Pr(>F)
## (Intercept) 0.615 1 1.6143 0.205355
## GADz 78.449 1 205.7467 < 2.2e-16 ***
## n_disability 1.813 1 4.7560 0.030352 *
## student.status 0.539 2 0.7071 0.494279
## n_orientation 0.050 1 0.1323 0.716443
## n_ethnicity 0.446 1 1.1686 0.280975
## n_gender 0.965 2 1.2654 0.284342
## UGPG 0.002 1 0.0060 0.938288
## n_year 2.660 3 2.3258 0.075936 .
## age 1.448 1 3.7964 0.052748 .
## SE_fi_z 3.708 1 9.7249 0.002083 **
## Residuals 77.020 202
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
car::Anova(PHQ_CUDIT2, type=3)
## Anova Table (Type III tests)
##
## Response: PHQz
## Sum Sq Df F value Pr(>F)
## (Intercept) 0.070 1 0.1187 0.731323
## CUDITz 0.649 1 1.0927 0.298794
## n_disability 6.222 1 10.4787 0.001716 **
## student.status 3.783 2 3.1852 0.046292 *
## n_orientation 0.746 1 1.2557 0.265578
## n_ethnicity 0.014 1 0.0242 0.876798
## n_gender 2.035 2 1.7136 0.186304
## UGPG 0.960 1 1.6164 0.207024
## n_year 0.437 3 0.2454 0.864425
## age 1.001 1 1.6857 0.197638
## SE_fi_z 10.953 1 18.4446 4.578e-05 ***
## Residuals 51.068 86
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
car::Anova(PHQ_AUDIT2, type=3)
## Anova Table (Type III tests)
##
## Response: PHQz
## Sum Sq Df F value Pr(>F)
## (Intercept) 1.579 1 2.0634 0.15242
## AUDITz 0.844 1 1.1027 0.29493
## n_disability 14.909 1 19.4769 1.656e-05 ***
## student.status 2.550 2 1.6657 0.19165
## n_orientation 0.447 1 0.5838 0.44570
## n_ethnicity 0.439 1 0.5732 0.44986
## n_gender 0.856 2 0.5593 0.57247
## UGPG 0.290 1 0.3788 0.53896
## n_year 2.002 3 0.8717 0.45667
## age 4.355 1 5.6898 0.01799 *
## SE_fi_z 21.181 1 27.6705 3.654e-07 ***
## Residuals 154.624 202
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
car::Anova(PHQ_unil2, type=3)
## Anova Table (Type III tests)
##
## Response: PHQz
## Sum Sq Df F value Pr(>F)
## (Intercept) 1.412 1 2.4285 0.1207095
## unil_z 38.052 1 65.4645 5.428e-14 ***
## n_disability 9.109 1 15.6709 0.0001044 ***
## student.status 3.102 2 2.6686 0.0717936 .
## n_orientation 0.064 1 0.1095 0.7410390
## n_ethnicity 0.288 1 0.4949 0.4825710
## n_gender 1.880 2 1.6168 0.2010879
## UGPG 0.841 1 1.4469 0.2304285
## n_year 2.604 3 1.4933 0.2175256
## age 4.745 1 8.1627 0.0047235 **
## SE_fi_z 14.548 1 25.0280 1.225e-06 ***
## Residuals 117.416 202
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
car::Anova(PHQ_prel2, type=3)
## Anova Table (Type III tests)
##
## Response: PHQz
## Sum Sq Df F value Pr(>F)
## (Intercept) 1.998 1 2.9392 0.0879888 .
## prel_z 18.164 1 26.7223 5.629e-07 ***
## n_disability 7.803 1 11.4801 0.0008457 ***
## student.status 2.324 2 1.7096 0.1835426
## n_orientation 0.066 1 0.0977 0.7548746
## n_ethnicity 0.033 1 0.0479 0.8269821
## n_gender 1.765 2 1.2984 0.2752420
## UGPG 0.557 1 0.8201 0.3662331
## n_year 2.088 3 1.0239 0.3830712
## age 5.396 1 7.9386 0.0053197 **
## SE_fi_z 22.438 1 33.0096 3.339e-08 ***
## Residuals 137.305 202
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
car::Anova(PHQ_SA2, type=3)
## Anova Table (Type III tests)
##
## Response: PHQz
## Sum Sq Df F value Pr(>F)
## (Intercept) 0.482 1 0.8191 0.3665323
## SAz 36.506 1 61.9886 2.075e-13 ***
## n_disability 9.221 1 15.6578 0.0001051 ***
## student.status 1.307 2 1.1097 0.3316698
## n_orientation 0.141 1 0.2399 0.6248213
## n_ethnicity 0.283 1 0.4807 0.4889028
## n_gender 0.640 2 0.5430 0.5818342
## UGPG 0.048 1 0.0819 0.7750797
## n_year 3.653 3 2.0675 0.1057260
## age 1.794 1 3.0458 0.0824652 .
## SE_fi_z 13.045 1 22.1505 4.674e-06 ***
## Residuals 118.962 202
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
car::Anova(PHQ_SCI2, type=3)
## Anova Table (Type III tests)
##
## Response: PHQz
## Sum Sq Df F value Pr(>F)
## (Intercept) 0.409 1 0.8020 0.3715832
## SCInz 52.677 1 103.2860 < 2.2e-16 ***
## n_disability 4.894 1 9.5951 0.0022358 **
## student.status 0.677 2 0.6633 0.5163183
## n_orientation 0.005 1 0.0101 0.9201150
## n_ethnicity 0.117 1 0.2293 0.6325704
## n_gender 2.384 2 2.3377 0.0992220 .
## UGPG 0.162 1 0.3179 0.5735076
## n_year 1.297 3 0.8480 0.4691434
## age 2.615 1 5.1268 0.0246488 *
## SE_fi_z 6.326 1 12.4031 0.0005326 ***
## Residuals 100.471 197
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
car::Anova(PHQ_PS2, type=3)
## Anova Table (Type III tests)
##
## Response: PHQz
## Sum Sq Df F value Pr(>F)
## (Intercept) 0.963 1 2.1514 0.144019
## PSz 65.382 1 146.1258 < 2.2e-16 ***
## n_disability 2.664 1 5.9533 0.015566 *
## student.status 0.287 2 0.3212 0.725627
## n_orientation 0.023 1 0.0520 0.819909
## n_ethnicity 0.072 1 0.1599 0.689679
## n_gender 0.342 2 0.3820 0.682975
## UGPG 0.209 1 0.4677 0.494825
## n_year 0.118 3 0.0879 0.966594
## age 1.762 1 3.9378 0.048586 *
## SE_fi_z 4.743 1 10.6013 0.001328 **
## Residuals 89.041 199
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
car::Anova(PHQ_wellbeing2, type=3)
## Anova Table (Type III tests)
##
## Response: PHQz
## Sum Sq Df F value Pr(>F)
## (Intercept) 0.042 1 0.1064 0.744592
## wellbeingz 75.164 1 188.7182 < 2.2e-16 ***
## n_disability 3.254 1 8.1705 0.004711 **
## student.status 0.472 2 0.5921 0.554125
## n_orientation 0.167 1 0.4204 0.517508
## n_ethnicity 0.331 1 0.8314 0.362961
## n_gender 1.420 2 1.7828 0.170849
## UGPG 0.002 1 0.0039 0.950388
## n_year 1.029 3 0.8613 0.462117
## age 0.347 1 0.8701 0.352061
## SE_fi_z 3.677 1 9.2309 0.002699 **
## Residuals 79.259 199
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
car::Anova(PHQ_SC2, type=3)
## Anova Table (Type III tests)
##
## Response: PHQz
## Sum Sq Df F value Pr(>F)
## (Intercept) 1.699 1 2.2939 0.131445
## SCz 5.874 1 7.9321 0.005338 **
## n_disability 14.694 1 19.8419 1.392e-05 ***
## student.status 3.012 2 2.0335 0.133547
## n_orientation 0.281 1 0.3798 0.538404
## n_ethnicity 0.267 1 0.3606 0.548871
## n_gender 0.799 2 0.5396 0.583839
## UGPG 0.296 1 0.3997 0.527959
## n_year 1.932 3 0.8697 0.457712
## age 4.149 1 5.6020 0.018886 *
## SE_fi_z 16.743 1 22.6088 3.770e-06 ***
## Residuals 149.594 202
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
car::Anova(PHQ_perfectionism2, type=3)
## Anova Table (Type III tests)
##
## Response: PHQz
## Sum Sq Df F value Pr(>F)
## (Intercept) 0.824 1 1.2009 0.2744871
## perfectionismz 18.003 1 26.2424 7.151e-07 ***
## n_disability 9.274 1 13.5182 0.0003046 ***
## student.status 2.348 2 1.7113 0.1833129
## n_orientation 0.113 1 0.1649 0.6851006
## n_ethnicity 0.309 1 0.4511 0.5026151
## n_gender 1.590 2 1.1589 0.3159483
## UGPG 0.534 1 0.7777 0.3789152
## n_year 2.248 3 1.0921 0.3535849
## age 3.223 1 4.6983 0.0313920 *
## SE_fi_z 14.927 1 21.7595 5.696e-06 ***
## Residuals 135.145 197
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
hist(resid(PHQ_GAD2))
hist(resid(PHQ_CUDIT2))
hist(resid(PHQ_AUDIT2))
hist(resid(PHQ_unil2))
hist(resid(PHQ_prel2))
hist(resid(PHQ_SA2))
hist(resid(PHQ_SCI2))
hist(resid(PHQ_PS2))
hist(resid(PHQ_wellbeing2))
hist(resid(PHQ_SC2))
hist(resid(PHQ_perfectionism2))
hist(resid(PHQ_aca2))
hist(resid(PHQ_acc2))
hist(resid(PHQ_fr2))
hist(resid(PHQ_co2))
skewness(resid(PHQ_GAD2))
## [1] 0.3613142
skewness(resid(PHQ_CUDIT2))
## [1] 0.670844
skewness(resid(PHQ_AUDIT2))
## [1] 0.6533526
skewness(resid(PHQ_unil2))
## [1] 0.522866
skewness(resid(PHQ_prel2))
## [1] 0.4184681
skewness(resid(PHQ_SA2))
## [1] 0.5304959
skewness(resid(PHQ_SCI2))
## [1] 0.7159856
skewness(resid(PHQ_PS2))
## [1] 0.3384039
skewness(resid(PHQ_wellbeing2))
## [1] 0.3454778
skewness(resid(PHQ_SC2))
## [1] 0.7023051
skewness(resid(PHQ_perfectionism2))
## [1] 0.6348944
skewness(resid(PHQ_aca2))
## [1] 0.48578
skewness(resid(PHQ_acc2))
## [1] 0.48578
skewness(resid(PHQ_fr2))
## [1] 0.4543321
skewness(resid(PHQ_co2))
## [1] 0.5771592
qqPlot(PHQ_GAD2)
## [1] 157 230
qqPlot(PHQ_AUDIT2)
## [1] 141 228
qqPlot(PHQ_unil2)
## [1] 141 197
qqPlot(PHQ_prel2)
## [1] 141 197
qqPlot(PHQ_SA2)
## [1] 197 230
qqPlot(PHQ_SCI2)
## [1] 141 197
qqPlot(PHQ_PS2)
## [1] 141 197
qqPlot(PHQ_wellbeing2)
## [1] 30 88
qqPlot(PHQ_SC2)
## [1] 141 228
qqPlot(PHQ_perfectionism2)
## [1] 141 197
qqPlot(PHQ_aca2)
## [1] 141 197
qqPlot(PHQ_acc2)
## [1] 141 197
qqPlot(PHQ_fr2)
## [1] 25 197
qqPlot(PHQ_co2)
## [1] 141 197
a <- vif(PHQ_GAD2)
b <- vif(PHQ_CUDIT2)
c <- vif(PHQ_AUDIT2)
d <- vif(PHQ_unil2)
e <- vif(PHQ_prel2)
f <- vif(PHQ_SA2)
g <- vif(PHQ_SCI2)
h <- vif(PHQ_PS2)
i <- vif(PHQ_wellbeing2)
j <- vif(PHQ_SC2)
k <- vif(PHQ_perfectionism2)
l <- vif(PHQ_aca2)
m <- vif(PHQ_acc2)
n <- vif(PHQ_fr2)
o <- vif(PHQ_co2)
a
## GVIF Df GVIF^(1/(2*Df))
## GADz 1.362802 1 1.167391
## n_disability 1.374865 1 1.172546
## student.status 1.565043 2 1.118489
## n_orientation 1.154260 1 1.074365
## n_ethnicity 1.362961 1 1.167459
## n_gender 1.250283 2 1.057431
## UGPG 1.776581 1 1.332884
## n_year 1.499285 3 1.069828
## age 1.812170 1 1.346169
## SE_fi_z 1.213949 1 1.101793
b
## GVIF Df GVIF^(1/(2*Df))
## CUDITz 1.309466 1 1.144319
## n_disability 1.235014 1 1.111312
## student.status 1.473269 2 1.101718
## n_orientation 1.219652 1 1.104378
## n_ethnicity 1.394761 1 1.181000
## n_gender 1.405155 2 1.088757
## UGPG 2.246895 1 1.498965
## n_year 2.166743 3 1.137543
## age 1.825997 1 1.351295
## SE_fi_z 1.306770 1 1.143140
c
## GVIF Df GVIF^(1/(2*Df))
## AUDITz 1.064927 1 1.031953
## n_disability 1.278374 1 1.130652
## student.status 1.551259 2 1.116018
## n_orientation 1.145813 1 1.070427
## n_ethnicity 1.369165 1 1.170113
## n_gender 1.251139 2 1.057612
## UGPG 1.786080 1 1.336443
## n_year 1.459714 3 1.065070
## age 1.820758 1 1.349355
## SE_fi_z 1.117466 1 1.057103
d
## GVIF Df GVIF^(1/(2*Df))
## unil_z 1.098716 1 1.048197
## n_disability 1.298968 1 1.139723
## student.status 1.551578 2 1.116075
## n_orientation 1.147791 1 1.071350
## n_ethnicity 1.363038 1 1.167492
## n_gender 1.247271 2 1.056794
## UGPG 1.772715 1 1.331433
## n_year 1.453297 3 1.064288
## age 1.788667 1 1.337411
## SE_fi_z 1.133631 1 1.064721
e
## GVIF Df GVIF^(1/(2*Df))
## prel_z 1.286030 1 1.134033
## n_disability 1.344463 1 1.159510
## student.status 1.551097 2 1.115989
## n_orientation 1.203095 1 1.096857
## n_ethnicity 1.376138 1 1.173089
## n_gender 1.285717 2 1.064845
## UGPG 1.770194 1 1.330487
## n_year 1.475486 3 1.066979
## age 1.789427 1 1.337695
## SE_fi_z 1.114844 1 1.055862
f
## GVIF Df GVIF^(1/(2*Df))
## SAz 1.220849 1 1.104920
## n_disability 1.298849 1 1.139670
## student.status 1.559688 2 1.117531
## n_orientation 1.179619 1 1.086103
## n_ethnicity 1.363066 1 1.167504
## n_gender 1.238401 2 1.054910
## UGPG 1.777106 1 1.333081
## n_year 1.486672 3 1.068323
## age 1.826113 1 1.351338
## SE_fi_z 1.144716 1 1.069914
g
## GVIF Df GVIF^(1/(2*Df))
## SCInz 1.249145 1 1.117651
## n_disability 1.351606 1 1.162586
## student.status 1.571898 2 1.119711
## n_orientation 1.152501 1 1.073546
## n_ethnicity 1.372011 1 1.171329
## n_gender 1.247180 2 1.056774
## UGPG 1.769814 1 1.330343
## n_year 1.455428 3 1.064548
## age 1.782763 1 1.335202
## SE_fi_z 1.214412 1 1.102004
h
## GVIF Df GVIF^(1/(2*Df))
## PSz 1.348801 1 1.161379
## n_disability 1.367460 1 1.169384
## student.status 1.567793 2 1.118980
## n_orientation 1.145029 1 1.070060
## n_ethnicity 1.371249 1 1.171003
## n_gender 1.252204 2 1.057837
## UGPG 1.767469 1 1.329462
## n_year 1.475302 3 1.066957
## age 1.797619 1 1.340753
## SE_fi_z 1.214669 1 1.102120
i
## GVIF Df GVIF^(1/(2*Df))
## wellbeingz 1.321962 1 1.149766
## n_disability 1.344368 1 1.159469
## student.status 1.589420 2 1.122819
## n_orientation 1.141055 1 1.068202
## n_ethnicity 1.355534 1 1.164274
## n_gender 1.240061 2 1.055263
## UGPG 1.774370 1 1.332055
## n_year 1.456568 3 1.064687
## age 1.838201 1 1.355803
## SE_fi_z 1.221941 1 1.105414
j
## GVIF Df GVIF^(1/(2*Df))
## SCz 1.072830 1 1.035775
## n_disability 1.277648 1 1.130331
## student.status 1.552465 2 1.116235
## n_orientation 1.148564 1 1.071711
## n_ethnicity 1.364543 1 1.168137
## n_gender 1.238397 2 1.054909
## UGPG 1.771189 1 1.330860
## n_year 1.443574 3 1.063098
## age 1.799097 1 1.341304
## SE_fi_z 1.158847 1 1.076498
k
## GVIF Df GVIF^(1/(2*Df))
## perfectionismz 1.134169 1 1.064974
## n_disability 1.332899 1 1.154513
## student.status 1.554018 2 1.116514
## n_orientation 1.150180 1 1.072465
## n_ethnicity 1.370313 1 1.170604
## n_gender 1.246518 2 1.056634
## UGPG 1.767297 1 1.329397
## n_year 1.452111 3 1.064143
## age 1.787824 1 1.337095
## SE_fi_z 1.159032 1 1.076583
l
## GVIF Df GVIF^(1/(2*Df))
## SE_aca_z 1.394807 1 1.181019
## n_disability 1.319175 1 1.148554
## student.status 1.555608 2 1.116799
## n_orientation 1.141541 1 1.068429
## n_ethnicity 1.542722 1 1.242063
## n_gender 1.243054 2 1.055899
## UGPG 1.770416 1 1.330570
## n_year 1.458436 3 1.064914
## age 1.829124 1 1.352451
## SE_fi_z 1.209841 1 1.099928
m
## GVIF Df GVIF^(1/(2*Df))
## SE_acc_z 1.394807 1 1.181019
## n_disability 1.319175 1 1.148554
## student.status 1.555608 2 1.116799
## n_orientation 1.141541 1 1.068429
## n_ethnicity 1.542722 1 1.242063
## n_gender 1.243054 2 1.055899
## UGPG 1.770416 1 1.330570
## n_year 1.458436 3 1.064914
## age 1.829124 1 1.352451
## SE_fi_z 1.209841 1 1.099928
n
## GVIF Df GVIF^(1/(2*Df))
## SE_fr_z 1.081821 1 1.040106
## n_disability 1.280302 1 1.131504
## student.status 1.572642 2 1.119844
## n_orientation 1.150569 1 1.072646
## n_ethnicity 1.362886 1 1.167427
## n_gender 1.258821 2 1.059232
## UGPG 1.781047 1 1.334559
## n_year 1.460243 3 1.065134
## age 1.799517 1 1.341461
## SE_fi_z 1.116678 1 1.056730
o
## GVIF Df GVIF^(1/(2*Df))
## SE_co_z 1.127726 1 1.061944
## n_disability 1.301065 1 1.140642
## student.status 1.654736 2 1.134181
## n_orientation 1.145706 1 1.070377
## n_ethnicity 1.387863 1 1.178076
## n_gender 1.261269 2 1.059746
## UGPG 1.745027 1 1.320995
## n_year 1.470889 3 1.066424
## age 1.784916 1 1.336008
## SE_fi_z 1.113887 1 1.055408
ta <- 1/a
tb <- 1/b
tc <- 1/c
td <- 1/d
te <- 1/e
tf <- 1/f
tg <- 1/g
th <- 1/h
ti <- 1/i
tj <- 1/j
tk <- 1/k
tl <- 1/l
tm <- 1/m
tn <- 1/n
to <- 1/o
ta
## GVIF Df GVIF^(1/(2*Df))
## GADz 0.7337821 1.0000000 0.8566108
## n_disability 0.7273441 1.0000000 0.8528447
## student.status 0.6389602 0.5000000 0.8940637
## n_orientation 0.8663556 1.0000000 0.9307822
## n_ethnicity 0.7336967 1.0000000 0.8565610
## n_gender 0.7998192 0.5000000 0.9456882
## UGPG 0.5628791 1.0000000 0.7502527
## n_year 0.6669847 0.3333333 0.9347296
## age 0.5518247 1.0000000 0.7428490
## SE_fi_z 0.8237580 1.0000000 0.9076112
tb
## GVIF Df GVIF^(1/(2*Df))
## CUDITz 0.7636699 1.0000000 0.8738821
## n_disability 0.8097072 1.0000000 0.8998373
## student.status 0.6787625 0.5000000 0.9076731
## n_orientation 0.8199062 1.0000000 0.9054867
## n_ethnicity 0.7169689 1.0000000 0.8467402
## n_gender 0.7116655 0.5000000 0.9184785
## UGPG 0.4450586 1.0000000 0.6671271
## n_year 0.4615221 0.3333333 0.8790875
## age 0.5476459 1.0000000 0.7400310
## SE_fi_z 0.7652458 1.0000000 0.8747833
tc
## GVIF Df GVIF^(1/(2*Df))
## AUDITz 0.9390314 1.0000000 0.9690363
## n_disability 0.7822439 1.0000000 0.8844455
## student.status 0.6446375 0.5000000 0.8960431
## n_orientation 0.8727424 1.0000000 0.9342068
## n_ethnicity 0.7303723 1.0000000 0.8546182
## n_gender 0.7992714 0.5000000 0.9455262
## UGPG 0.5598852 1.0000000 0.7482548
## n_year 0.6850658 0.3333333 0.9389059
## age 0.5492217 1.0000000 0.7410949
## SE_fi_z 0.8948814 1.0000000 0.9459817
td
## GVIF Df GVIF^(1/(2*Df))
## unil_z 0.9101531 1.0000000 0.9540194
## n_disability 0.7698416 1.0000000 0.8774062
## student.status 0.6445052 0.5000000 0.8959971
## n_orientation 0.8712386 1.0000000 0.9334016
## n_ethnicity 0.7336554 1.0000000 0.8565368
## n_gender 0.8017504 0.5000000 0.9462585
## UGPG 0.5641064 1.0000000 0.7510702
## n_year 0.6880906 0.3333333 0.9395955
## age 0.5590755 1.0000000 0.7477135
## SE_fi_z 0.8821212 1.0000000 0.9392131
te
## GVIF Df GVIF^(1/(2*Df))
## prel_z 0.7775865 1.0000000 0.8818087
## n_disability 0.7437916 1.0000000 0.8624336
## student.status 0.6447048 0.5000000 0.8960665
## n_orientation 0.8311896 1.0000000 0.9116960
## n_ethnicity 0.7266714 1.0000000 0.8524502
## n_gender 0.7777762 0.5000000 0.9391039
## UGPG 0.5649097 1.0000000 0.7516048
## n_year 0.6777426 0.3333333 0.9372256
## age 0.5588381 1.0000000 0.7475547
## SE_fi_z 0.8969866 1.0000000 0.9470938
tf
## GVIF Df GVIF^(1/(2*Df))
## SAz 0.8191022 1.0000000 0.9050427
## n_disability 0.7699127 1.0000000 0.8774467
## student.status 0.6411538 0.5000000 0.8948301
## n_orientation 0.8477313 1.0000000 0.9207232
## n_ethnicity 0.7336403 1.0000000 0.8565281
## n_gender 0.8074927 0.5000000 0.9479483
## UGPG 0.5627127 1.0000000 0.7501418
## n_year 0.6726435 0.3333333 0.9360467
## age 0.5476112 1.0000000 0.7400076
## SE_fi_z 0.8735791 1.0000000 0.9346545
tg
## GVIF Df GVIF^(1/(2*Df))
## SCInz 0.8005478 1.0000000 0.8947334
## n_disability 0.7398608 1.0000000 0.8601516
## student.status 0.6361737 0.5000000 0.8930873
## n_orientation 0.8676784 1.0000000 0.9314926
## n_ethnicity 0.7288574 1.0000000 0.8537314
## n_gender 0.8018090 0.5000000 0.9462758
## UGPG 0.5650313 1.0000000 0.7516856
## n_year 0.6870832 0.3333333 0.9393661
## age 0.5609270 1.0000000 0.7489506
## SE_fi_z 0.8234435 1.0000000 0.9074379
th
## GVIF Df GVIF^(1/(2*Df))
## PSz 0.7413990 1.0000000 0.8610453
## n_disability 0.7312831 1.0000000 0.8551509
## student.status 0.6378393 0.5000000 0.8936713
## n_orientation 0.8733403 1.0000000 0.9345268
## n_ethnicity 0.7292624 1.0000000 0.8539686
## n_gender 0.7985920 0.5000000 0.9453252
## UGPG 0.5657806 1.0000000 0.7521839
## n_year 0.6778274 0.3333333 0.9372451
## age 0.5562913 1.0000000 0.7458494
## SE_fi_z 0.8232698 1.0000000 0.9073422
ti
## GVIF Df GVIF^(1/(2*Df))
## wellbeingz 0.7564515 1.0000000 0.8697422
## n_disability 0.7438439 1.0000000 0.8624638
## student.status 0.6291604 0.5000000 0.8906157
## n_orientation 0.8763820 1.0000000 0.9361527
## n_ethnicity 0.7377168 1.0000000 0.8589044
## n_gender 0.8064122 0.5000000 0.9476310
## UGPG 0.5635802 1.0000000 0.7507198
## n_year 0.6865452 0.3333333 0.9392435
## age 0.5440102 1.0000000 0.7375705
## SE_fi_z 0.8183701 1.0000000 0.9046381
tj
## GVIF Df GVIF^(1/(2*Df))
## SCz 0.9321145 1.0000000 0.9654608
## n_disability 0.7826883 1.0000000 0.8846968
## student.status 0.6441369 0.5000000 0.8958691
## n_orientation 0.8706520 1.0000000 0.9330874
## n_ethnicity 0.7328460 1.0000000 0.8560642
## n_gender 0.8074953 0.5000000 0.9479490
## UGPG 0.5645925 1.0000000 0.7513937
## n_year 0.6927253 0.3333333 0.9406474
## age 0.5558345 1.0000000 0.7455431
## SE_fi_z 0.8629267 1.0000000 0.9289385
tk
## GVIF Df GVIF^(1/(2*Df))
## perfectionismz 0.8817026 1.0000000 0.9389902
## n_disability 0.7502442 1.0000000 0.8661664
## student.status 0.6434930 0.5000000 0.8956451
## n_orientation 0.8694290 1.0000000 0.9324318
## n_ethnicity 0.7297600 1.0000000 0.8542599
## n_gender 0.8022349 0.5000000 0.9464014
## UGPG 0.5658359 1.0000000 0.7522206
## n_year 0.6886526 0.3333333 0.9397234
## age 0.5593392 1.0000000 0.7478898
## SE_fi_z 0.8627893 1.0000000 0.9288645
tl
## GVIF Df GVIF^(1/(2*Df))
## SE_aca_z 0.7169452 1.0000000 0.8467262
## n_disability 0.7580493 1.0000000 0.8706603
## student.status 0.6428357 0.5000000 0.8954163
## n_orientation 0.8760092 1.0000000 0.9359536
## n_ethnicity 0.6482051 1.0000000 0.8051118
## n_gender 0.8044701 0.5000000 0.9470599
## UGPG 0.5648389 1.0000000 0.7515577
## n_year 0.6856658 0.3333333 0.9390429
## age 0.5467099 1.0000000 0.7393984
## SE_fi_z 0.8265546 1.0000000 0.9091505
tm
## GVIF Df GVIF^(1/(2*Df))
## SE_acc_z 0.7169452 1.0000000 0.8467262
## n_disability 0.7580493 1.0000000 0.8706603
## student.status 0.6428357 0.5000000 0.8954163
## n_orientation 0.8760092 1.0000000 0.9359536
## n_ethnicity 0.6482051 1.0000000 0.8051118
## n_gender 0.8044701 0.5000000 0.9470599
## UGPG 0.5648389 1.0000000 0.7515577
## n_year 0.6856658 0.3333333 0.9390429
## age 0.5467099 1.0000000 0.7393984
## SE_fi_z 0.8265546 1.0000000 0.9091505
tn
## GVIF Df GVIF^(1/(2*Df))
## SE_fr_z 0.9243671 1.0000000 0.9614401
## n_disability 0.7810660 1.0000000 0.8837794
## student.status 0.6358725 0.5000000 0.8929816
## n_orientation 0.8691353 1.0000000 0.9322742
## n_ethnicity 0.7337372 1.0000000 0.8565846
## n_gender 0.7943939 0.5000000 0.9440804
## UGPG 0.5614674 1.0000000 0.7493113
## n_year 0.6848177 0.3333333 0.9388492
## age 0.5557046 1.0000000 0.7454560
## SE_fi_z 0.8955134 1.0000000 0.9463157
to
## GVIF Df GVIF^(1/(2*Df))
## SE_co_z 0.8867405 1.0000000 0.9416690
## n_disability 0.7686011 1.0000000 0.8766990
## student.status 0.6043260 0.5000000 0.8816939
## n_orientation 0.8728243 1.0000000 0.9342507
## n_ethnicity 0.7205320 1.0000000 0.8488416
## n_gender 0.7928521 0.5000000 0.9436220
## UGPG 0.5730570 1.0000000 0.7570053
## n_year 0.6798611 0.3333333 0.9377132
## age 0.5602503 1.0000000 0.7484987
## SE_fi_z 0.8977575 1.0000000 0.9475007
#### PHQ tables without finance and covariates####
PHQ_GADt1 <- export_summs(PHQ_GAD, scale = TRUE)
PHQ_CUDITt1 <- export_summs(PHQ_CUDIT,scale = TRUE)
PHQ_AUDITt1 <-export_summs(PHQ_AUDIT,scale = TRUE)
PHQ_unilt1 <- export_summs(PHQ_unil,scale = TRUE)
PHQ_prelt1 <- export_summs(PHQ_prel,scale = TRUE)
PHQ_SAt1 <- export_summs(PHQ_SA,scale = TRUE)
PHQ_SCIt1 <- export_summs(PHQ_SCI,scale = TRUE)
PHQ_PSt1 <- export_summs(PHQ_PS,scale = TRUE)
PHQ_SCt1 <- export_summs(PHQ_SC,scale = TRUE)
PHQ_wellbeingt1 <-export_summs(PHQ_wellbeing,scale = TRUE)
PHQ_perfectionismt1 <-export_summs(PHQ_perfectionism,scale = TRUE)
PHQ_acat1 <- export_summs(PHQ_aca,scale = TRUE)
PHQ_acct1 <- export_summs(PHQ_acc,scale = TRUE)
PHQ_frt1 <- export_summs(PHQ_fr,scale = TRUE)
PHQ_cot1 <- export_summs(PHQ_co,scale = TRUE)
PHQ_GADr1 <- PHQ_GADt1[7,2]
PHQ_CUDITr1 <- PHQ_CUDITt1[7,2]
PHQ_AUDITr1 <-PHQ_AUDITt1[7,2]
PHQ_unilr1 <- PHQ_unilt1[7,2]
PHQ_prelr1 <- PHQ_prelt1[7,2]
PHQ_SAr1 <- PHQ_SAt1[7,2]
PHQ_SCIr1 <- PHQ_SCIt1[7,2]
PHQ_PSr1 <- PHQ_PSt1[7,2]
PHQ_SCr1 <- PHQ_SCt1[7,2]
PHQ_wellbeingz1 <-PHQ_wellbeingt1[7,2]
PHQ_perfectionismz1 <-PHQ_perfectionismt1[7,2]
PHQ_acaz1 <- PHQ_acat1[7,2]
PHQ_accz1 <- PHQ_acct1[7,2]
PHQ_frz1 <- PHQ_frt1[7,2]
PHQ_coz1 <- PHQ_cot1[7,2]
PHQ_GADr1$model <- "GAD"
PHQ_CUDITr1$model <- "CUDIT"
PHQ_AUDITr1$model <- "AUDIT"
PHQ_unilr1$model <- "Unil"
PHQ_prelr1$model <- "Prel"
PHQ_SAr1$model <- "SA"
PHQ_SCIr1$model <- "SCI"
PHQ_PSr1$model <- "PS"
PHQ_SCr1$model <- "SC"
PHQ_wellbeingz1$model <- "wellbeing"
PHQ_perfectionismz1$model <-"perfectionism"
PHQ_acaz1$model <- "academic"
PHQ_accz1$model <- "accomodation"
PHQ_frz1$model <- "friendship"
PHQ_coz1$model <- "community"
rsquared_simp <- rbind(PHQ_GADr1,
PHQ_CUDITr1,PHQ_AUDITr1,PHQ_unilr1,
PHQ_prelr1,PHQ_SAr1,PHQ_SCIr1,
PHQ_PSr1,PHQ_SCr1,PHQ_wellbeingz1,PHQ_perfectionismz1,
PHQ_acaz1,PHQ_accz1,PHQ_frz1,PHQ_coz1)
PHQ_GADn1 <- PHQ_GADt1[6,2]
PHQ_CUDITn1 <- PHQ_CUDITt1[6,2]
PHQ_AUDITn1 <-PHQ_AUDITt1[6,2]
PHQ_uniln1 <- PHQ_unilt1[6,2]
PHQ_preln1 <- PHQ_prelt1[6,2]
PHQ_SAn1 <- PHQ_SAt1[6,2]
PHQ_SCIn1 <- PHQ_SCIt1[6,2]
PHQ_PSn1 <- PHQ_PSt1[6,2]
PHQ_SCn1 <- PHQ_SCt1[6,2]
PHQ_wellbeingn1 <-PHQ_wellbeingt1[6,2]
PHQ_perfectionismn1 <-PHQ_perfectionismt1[6,2]
PHQ_acan1 <- PHQ_acat1[6,2]
PHQ_accn1 <- PHQ_acct1[6,2]
PHQ_frn1 <- PHQ_frt1[6,2]
PHQ_con1 <- PHQ_cot1[6,2]
PHQ_GADn1$model <- "GAD"
PHQ_CUDITn1$model <- "CUDIT"
PHQ_AUDITn1$model <- "AUDIT"
PHQ_uniln1$model <- "Unil"
PHQ_preln1$model <- "Prel"
PHQ_SAn1$model <- "SA"
PHQ_SCIn1$model <- "SCI"
PHQ_PSn1$model <- "PS"
PHQ_SCn1$model <- "SC"
PHQ_wellbeingn1$model <- "wellbeing"
PHQ_perfectionismn1$model <-"perfectionism"
PHQ_acan1$model <- "academic"
PHQ_accn1$model <- "accomodation"
PHQ_frn1$model <- "friendship"
PHQ_con1$model <- "community"
n_simp <- rbind(PHQ_GADn1,
PHQ_CUDITn1,PHQ_AUDITn1,PHQ_uniln1,
PHQ_preln1,PHQ_SAn1,PHQ_SCIn1,
PHQ_PSn1,PHQ_SCn1,PHQ_wellbeingn1,PHQ_perfectionismn1,
PHQ_acan1,PHQ_accn1,PHQ_frn1,PHQ_con1)
colnames(rsquared_simp)<- c("rsquared", "model")
colnames(n_simp)<- c("n", "model")
all_models_simp <- rbind(
tidy(PHQ_GAD) %>% mutate(model = "GAD"),
tidy(PHQ_CUDIT) %>% mutate(model = "CUDIT"),
tidy(PHQ_AUDIT) %>% mutate(model = "AUDIT"),
tidy(PHQ_unil) %>% mutate(model = "Unil"),
tidy(PHQ_prel) %>% mutate(model = "Prel"),
tidy(PHQ_SA) %>% mutate(model = "SA"),
tidy(PHQ_SCI) %>% mutate(model = "SCI"),
tidy(PHQ_PS) %>% mutate(model = "PS"),
tidy(PHQ_wellbeing) %>% mutate(model = "wellbeing"),
tidy(PHQ_SC) %>% mutate(model = "SC"),
tidy(PHQ_perfectionism) %>% mutate(model = "perfectionism"),
tidy(PHQ_aca) %>% mutate(model = "academic"),
tidy(PHQ_co) %>% mutate(model = "community"),
tidy(PHQ_fr) %>% mutate(model = "friendship"),
tidy(PHQ_acc) %>% mutate(model = "accomodation")
)
finaltable1_PHQ <- right_join( all_models_simp, rsquared_simp)
## Joining with `by = join_by(model)`
finaltable1_PHQ <- right_join( n_simp, finaltable1_PHQ)
## Joining with `by = join_by(model)`
## Warning in right_join(n_simp, finaltable1_PHQ): Each row in `x` is expected to match at most 1 row in `y`.
## ℹ Row 1 of `x` matches multiple rows.
## ℹ If multiple matches are expected, set `multiple = "all"` to silence this
## warning.
finaltable1_PHQ <- as.data.frame(finaltable1_PHQ)
finaltable1_PHQ <- finaltable1_PHQ[c(2,4,6,8,10,12,14,16,18,20,22,24,26,28,30),]
colnames(finaltable1_PHQ)<- c("N", "model","term", "beta", "SE", "t", "p", "rsquared" )
finaltable1_PHQ$beta <- round(finaltable1_PHQ$beta, digits = 2)
finaltable1_PHQ$rsquared <- as.numeric(finaltable1_PHQ$rsquared)
finaltable1_PHQ$rsquared <- round(finaltable1_PHQ$rsquared, digits = 2)
finaltable1_PHQ$p <- round(finaltable1_PHQ$p, digits = 3)
finaltable1_PHQ <- finaltable1_PHQ[,c(3,1,4,8,7)]
#### GAD tables without finance and covariates####
GAD_PHQt1 <- export_summs(GAD_PHQ, scale = TRUE)
GAD_CUDITt1 <- export_summs(GAD_CUDIT,scale = TRUE)
GAD_AUDITt1 <-export_summs(GAD_AUDIT,scale = TRUE)
GAD_unilt1 <- export_summs(GAD_unil,scale = TRUE)
GAD_prelt1 <- export_summs(GAD_prel,scale = TRUE)
GAD_SAt1 <- export_summs(GAD_SA,scale = TRUE)
GAD_SCIt1 <- export_summs(GAD_SCI,scale = TRUE)
GAD_PSt1 <- export_summs(GAD_PS,scale = TRUE)
GAD_SCt1 <- export_summs(GAD_SC,scale = TRUE)
GAD_wellbeingt1 <-export_summs(GAD_wellbeing,scale = TRUE)
GAD_perfectionismt1 <-export_summs(GAD_perfectionism,scale = TRUE)
GAD_acat1 <- export_summs(GAD_aca,scale = TRUE)
GAD_acct1 <- export_summs(GAD_acc,scale = TRUE)
GAD_frt1 <- export_summs(GAD_fr,scale = TRUE)
GAD_cot1 <- export_summs(GAD_co,scale = TRUE)
GAD_PHQr1 <- GAD_PHQt1[7,2]
GAD_CUDITr1 <- GAD_CUDITt1[7,2]
GAD_AUDITr1 <-GAD_AUDITt1[7,2]
GAD_unilr1 <- GAD_unilt1[7,2]
GAD_prelr1 <- GAD_prelt1[7,2]
GAD_SAr1 <- GAD_SAt1[7,2]
GAD_SCIr1 <- GAD_SCIt1[7,2]
GAD_PSr1 <- GAD_PSt1[7,2]
GAD_SCr1 <- GAD_SCt1[7,2]
GAD_wellbeingz1 <-GAD_wellbeingt1[7,2]
GAD_perfectionismz1 <-GAD_perfectionismt1[7,2]
GAD_acaz1 <- GAD_acat1[7,2]
GAD_accz1 <- GAD_acct1[7,2]
GAD_frz1 <- GAD_frt1[7,2]
GAD_coz1 <- GAD_cot1[7,2]
GAD_PHQr1$model <- "PHQ"
GAD_CUDITr1$model <- "CUDIT"
GAD_AUDITr1$model <- "AUDIT"
GAD_unilr1$model <- "Unil"
GAD_prelr1$model <- "Prel"
GAD_SAr1$model <- "SA"
GAD_SCIr1$model <- "SCI"
GAD_PSr1$model <- "PS"
GAD_SCr1$model <- "SC"
GAD_wellbeingz1$model <- "wellbeing"
GAD_perfectionismz1$model <-"perfectionism"
GAD_acaz1$model <- "academic"
GAD_accz1$model <- "accomodation"
GAD_frz1$model <- "friendship"
GAD_coz1$model <- "community"
rsquared_simp1 <- rbind(GAD_PHQr1,
GAD_CUDITr1,GAD_AUDITr1,GAD_unilr1,
GAD_prelr1,GAD_SAr1,GAD_SCIr1,
GAD_PSr1,GAD_SCr1,GAD_wellbeingz1,GAD_perfectionismz1,
GAD_acaz1,GAD_accz1,GAD_frz1,GAD_coz1)
GAD_PHQn1 <- GAD_PHQt1[6,2]
GAD_CUDITn1 <- GAD_CUDITt1[6,2]
GAD_AUDITn1 <-GAD_AUDITt1[6,2]
GAD_uniln1<- GAD_unilt1[6,2]
GAD_preln1 <- GAD_prelt1[6,2]
GAD_SAn1 <- GAD_SAt1[6,2]
GAD_SCIn1 <- GAD_SCIt1[6,2]
GAD_PSn1 <- GAD_PSt1[6,2]
GAD_SCn1 <- GAD_SCt1[6,2]
GAD_wellbeingn1 <-GAD_wellbeingt1[6,2]
GAD_perfectionismn1 <-GAD_perfectionismt1[6,2]
GAD_acan1 <- GAD_acat1[6,2]
GAD_accn1 <- GAD_acct1[6,2]
GAD_frn1 <- GAD_frt1[6,2]
GAD_con1 <- GAD_cot1[6,2]
GAD_PHQn1$model <- "PHQ"
GAD_CUDITn1$model <- "CUDIT"
GAD_AUDITn1$model <- "AUDIT"
GAD_uniln1$model <- "Unil"
GAD_preln1$model <- "Prel"
GAD_SAn1$model <- "SA"
GAD_SCIn1$model <- "SCI"
GAD_PSn1$model <- "PS"
GAD_SCn1$model <- "SC"
GAD_wellbeingn1$model <- "wellbeing"
GAD_perfectionismn1$model <-"perfectionism"
GAD_acan1$model <- "academic"
GAD_accn1$model <- "accomodation"
GAD_frn1$model <- "friendship"
GAD_con1$model <- "community"
n21 <- rbind(GAD_PHQn1,
GAD_CUDITn1,GAD_AUDITn1,GAD_uniln1,
GAD_preln1,GAD_SAn1,GAD_SCIn1,
GAD_PSn1,GAD_SCn1,GAD_wellbeingn1,GAD_perfectionismn1,
GAD_acan1,GAD_accn1,GAD_frn1,GAD_con1)
colnames(rsquared_simp1)<- c("rsquared", "model")
colnames(n21)<- c("n", "model")
all_models_simp1 <- rbind(
tidy(GAD_PHQ) %>% mutate(model = "PHQ"),
tidy(GAD_CUDIT) %>% mutate(model = "CUDIT"),
tidy(GAD_AUDIT) %>% mutate(model = "AUDIT"),
tidy(GAD_unil) %>% mutate(model = "Unil"),
tidy(GAD_prel) %>% mutate(model = "Prel"),
tidy(GAD_SA) %>% mutate(model = "SA"),
tidy(GAD_SCI) %>% mutate(model = "SCI"),
tidy(GAD_PS) %>% mutate(model = "PS"),
tidy(GAD_wellbeing) %>% mutate(model = "wellbeing"),
tidy(GAD_SC) %>% mutate(model = "SC"),
tidy(GAD_perfectionism) %>% mutate(model = "perfectionism"),
tidy(GAD_aca) %>% mutate(model = "academic"),
tidy(GAD_co) %>% mutate(model = "community"),
tidy(GAD_fr) %>% mutate(model = "friendship"),
tidy(GAD_acc) %>% mutate(model = "accomodation")
)
finaltable1_GAD <- right_join( all_models_simp1, rsquared_simp1)
## Joining with `by = join_by(model)`
finaltable1_GAD <- right_join( n21, finaltable1_GAD)
## Joining with `by = join_by(model)`
## Warning in right_join(n21, finaltable1_GAD): Each row in `x` is expected to match at most 1 row in `y`.
## ℹ Row 1 of `x` matches multiple rows.
## ℹ If multiple matches are expected, set `multiple = "all"` to silence this
## warning.
finaltable1_GAD <- as.data.frame(finaltable1_GAD)
finaltable1_GAD <- finaltable1_GAD[c(2,4,6,8,10,12,14,16,18,20,22,24,26,28,30),]
colnames(finaltable1_GAD)<- c("N1", "model", "term", "beta1", "SE", "t", "p1", "rsquared1" )
finaltable1_GAD$beta1 <- round(finaltable1_GAD$beta1, digits = 2)
finaltable1_GAD$rsquared1 <- as.numeric(finaltable1_GAD$rsquared1)
finaltable1_GAD$rsquared1 <- round(finaltable1_GAD$rsquared1, digits = 2)
finaltable1_GAD$p1 <- round(finaltable1_GAD$p1, digits = 3)
finaltable1_GAD <- finaltable1_GAD[,c(3,1,4,8,7)]
PHQ <- as.data.frame(rbind(c("term","N", "beta", "rsquared", "p"),
c("PHQz", "-","-","-", "-" ))
)
names(PHQ) <- PHQ[1,]
PHQ <- PHQ[- c(1),]
GAD <- as.data.frame(rbind(c("term", "N1","beta1", "rsquared1", "p1"),
c("GADz","-", "-", "-", "-"))
)
names(GAD) <- GAD[1,]
GAD <- GAD[- c(1),]
# final table 1 (simple) ####
finaltable1_GAD <- rbind( GAD, finaltable1_GAD)
finaltable1_PHQ <- rbind(PHQ, finaltable1_PHQ)
final_table1 <- right_join(finaltable1_GAD,finaltable1_PHQ)
## Joining with `by = join_by(term)`
write.csv(final_table1, file = "final_table1.csv")
knitr::kable(final_table1, "pipe", caption = "Single Linear Regressions with scales as predictors")
| term | N1 | beta1 | rsquared1 | p1 | N | beta | rsquared | p |
|---|---|---|---|---|---|---|---|---|
| GADz | - | - | - | - | 242 | 0.78 | 0.6 | 0 |
| PHQz | 242 | 0.77 | 0.6 | 0 | - | - | - | - |
| CUDITz | 113 | 0.14 | 0.02 | 0.135 | 113 | 0.13 | 0.02 | 0.171 |
| AUDITz | 242 | 0.08 | 0.01 | 0.211 | 242 | 0.09 | 0.01 | 0.16 |
| unil_z | 242 | 0.42 | 0.17 | 0 | 242 | 0.5 | 0.24 | 0 |
| prel_z | 242 | 0.39 | 0.15 | 0 | 242 | 0.41 | 0.17 | 0 |
| SAz | 242 | 0.56 | 0.32 | 0 | 242 | 0.53 | 0.28 | 0 |
| SCInz | 236 | 0.59 | 0.35 | 0 | 236 | 0.66 | 0.43 | 0 |
| PSz | 238 | 0.68 | 0.46 | 0 | 238 | 0.73 | 0.52 | 0 |
| SCz | 242 | -0.1 | 0.01 | 0.112 | 242 | -0.25 | 0.06 | 0 |
| wellbeingz | 238 | -0.68 | 0.46 | 0 | 238 | -0.76 | 0.57 | 0 |
| perfectionismz | 236 | 0.41 | 0.17 | 0 | 236 | 0.39 | 0.15 | 0 |
| SE_aca_z | 242 | -0.38 | 0.14 | 0 | 242 | -0.43 | 0.18 | 0 |
| SE_acc_z | 242 | -0.38 | 0.14 | 0 | 242 | -0.43 | 0.18 | 0 |
| SE_fr_z | 242 | -0.21 | 0.05 | 0.001 | 242 | -0.3 | 0.09 | 0 |
| SE_co_z | 234 | -0.23 | 0.06 | 0 | 234 | -0.19 | 0.04 | 0.004 |
### PHQ with just covariates ####
PHQ_GADt2 <- export_summs(PHQ_GAD1, scale = TRUE)
PHQ_CUDITt2 <- export_summs(PHQ_CUDIT1,scale = TRUE)
PHQ_AUDITt2 <-export_summs(PHQ_AUDIT1,scale = TRUE)
PHQ_unilt2 <- export_summs(PHQ_unil1,scale = TRUE)
PHQ_prelt2 <- export_summs(PHQ_prel1,scale = TRUE)
PHQ_SAt2 <- export_summs(PHQ_SA1,scale = TRUE)
PHQ_SCIt2 <- export_summs(PHQ_SCI1,scale = TRUE)
PHQ_PSt2 <- export_summs(PHQ_PS1,scale = TRUE)
PHQ_SCt2 <- export_summs(PHQ_SC1,scale = TRUE)
PHQ_wellbeingt2 <-export_summs(PHQ_wellbeing1,scale = TRUE)
PHQ_perfectionismt2 <-export_summs(PHQ_perfectionism1,scale = TRUE)
PHQ_acat2 <- export_summs(PHQ_aca1,scale = TRUE)
PHQ_acct2 <- export_summs(PHQ_acc1,scale = TRUE)
PHQ_frt2 <- export_summs(PHQ_fr1,scale = TRUE)
PHQ_cot2 <- export_summs(PHQ_co1,scale = TRUE)
PHQ_GADr2 <- PHQ_GADt2[31,2]
PHQ_CUDITr2 <- PHQ_CUDITt2[31,2]
PHQ_AUDITr2 <-PHQ_AUDITt2[31,2]
PHQ_unilr2 <- PHQ_unilt2[31,2]
PHQ_prelr2 <- PHQ_prelt2[31,2]
PHQ_SAr2 <- PHQ_SAt2[31,2]
PHQ_SCIr2 <- PHQ_SCIt2[31,2]
PHQ_PSr2 <- PHQ_PSt2[31,2]
PHQ_SCr2 <- PHQ_SCt2[31,2]
PHQ_wellbeingz2 <-PHQ_wellbeingt2[31,2]
PHQ_perfectionismz2 <-PHQ_perfectionismt2[31,2]
PHQ_acaz2 <- PHQ_acat2[31,2]
PHQ_accz2 <- PHQ_acct2[31,2]
PHQ_frz2 <- PHQ_frt2[31,2]
PHQ_coz2 <- PHQ_cot2[31,2]
PHQ_GADr2$model <- "GAD"
PHQ_CUDITr2$model <- "CUDIT"
PHQ_AUDITr2$model <- "AUDIT"
PHQ_unilr2$model <- "Unil"
PHQ_prelr2$model <- "Prel"
PHQ_SAr2$model <- "SA"
PHQ_SCIr2$model <- "SCI"
PHQ_PSr2$model <- "PS"
PHQ_SCr2$model <- "SC"
PHQ_wellbeingz2$model <- "wellbeing"
PHQ_perfectionismz2$model <-"perfectionism"
PHQ_acaz2$model <- "academic"
PHQ_accz2$model <- "accomodation"
PHQ_frz2$model <- "friendship"
PHQ_coz2$model <- "community"
rsquared_simp2 <- rbind(PHQ_GADr2,
PHQ_CUDITr2,PHQ_AUDITr2,PHQ_unilr2,
PHQ_prelr2,PHQ_SAr2,PHQ_SCIr2,
PHQ_PSr2,PHQ_SCr2,PHQ_wellbeingz2,PHQ_perfectionismz2,
PHQ_acaz2,PHQ_accz2,PHQ_frz2,PHQ_coz2)
PHQ_GADn2 <- PHQ_GADt2[30,2]
PHQ_CUDITn2 <- PHQ_CUDITt2[30,2]
PHQ_AUDITn2 <-PHQ_AUDITt2[30,2]
PHQ_uniln2 <- PHQ_unilt2[30,2]
PHQ_preln2 <- PHQ_prelt2[30,2]
PHQ_SAn2 <- PHQ_SAt2[30,2]
PHQ_SCIn2 <- PHQ_SCIt2[30,2]
PHQ_PSn2 <- PHQ_PSt2[30,2]
PHQ_SCn2 <- PHQ_SCt2[30,2]
PHQ_wellbeingn2 <-PHQ_wellbeingt2[30,2]
PHQ_perfectionismn2 <-PHQ_perfectionismt2[30,2]
PHQ_acan2 <- PHQ_acat2[30,2]
PHQ_accn2 <- PHQ_acct2[30,2]
PHQ_frn2 <- PHQ_frt2[30,2]
PHQ_con2 <- PHQ_cot2[30,2]
PHQ_GADn2$model <- "GAD"
PHQ_CUDITn2$model <- "CUDIT"
PHQ_AUDITn2$model <- "AUDIT"
PHQ_uniln2$model <- "Unil"
PHQ_preln2$model <- "Prel"
PHQ_SAn2$model <- "SA"
PHQ_SCIn2$model <- "SCI"
PHQ_PSn2$model <- "PS"
PHQ_SCn2$model <- "SC"
PHQ_wellbeingn2$model <- "wellbeing"
PHQ_perfectionismn2$model <-"perfectionism"
PHQ_acan2$model <- "academic"
PHQ_accn2$model <- "accomodation"
PHQ_frn2$model <- "friendship"
PHQ_con2$model <- "community"
n_simp2 <- rbind(PHQ_GADn2,
PHQ_CUDITn2,PHQ_AUDITn2,PHQ_uniln2,
PHQ_preln2,PHQ_SAn2,PHQ_SCIn2,
PHQ_PSn2,PHQ_SCn2,PHQ_wellbeingn2,PHQ_perfectionismn2,
PHQ_acan2,PHQ_accn2,PHQ_frn2,PHQ_con2)
colnames(rsquared_simp2)<- c("rsquared", "model")
colnames(n_simp2)<- c("n", "model")
all_models_simp2 <- rbind(
tidy(PHQ_GAD1) %>% mutate(model = "GAD"),
tidy(PHQ_CUDIT1) %>% mutate(model = "CUDIT"),
tidy(PHQ_AUDIT1) %>% mutate(model = "AUDIT"),
tidy(PHQ_unil1) %>% mutate(model = "Unil"),
tidy(PHQ_prel1) %>% mutate(model = "Prel"),
tidy(PHQ_SA1) %>% mutate(model = "SA"),
tidy(PHQ_SCI1) %>% mutate(model = "SCI"),
tidy(PHQ_PS1) %>% mutate(model = "PS"),
tidy(PHQ_wellbeing1) %>% mutate(model = "wellbeing"),
tidy(PHQ_SC1) %>% mutate(model = "SC"),
tidy(PHQ_perfectionism1) %>% mutate(model = "perfectionism"),
tidy(PHQ_aca1) %>% mutate(model = "academic"),
tidy(PHQ_co1) %>% mutate(model = "community"),
tidy(PHQ_fr1) %>% mutate(model = "friendship"),
tidy(PHQ_acc1) %>% mutate(model = "accomodation")
)
finaltable_PHQ <- right_join( all_models_simp2, rsquared_simp2)
## Joining with `by = join_by(model)`
finaltable_PHQ <- right_join(n_simp2, finaltable_PHQ)
## Joining with `by = join_by(model)`
## Warning in right_join(n_simp2, finaltable_PHQ): Each row in `x` is expected to match at most 1 row in `y`.
## ℹ Row 1 of `x` matches multiple rows.
## ℹ If multiple matches are expected, set `multiple = "all"` to silence this
## warning.
finaltable_PHQ <- as.data.frame(finaltable_PHQ)
finaltable_PHQ <- finaltable_PHQ[c(2,16,30,44,58,72,86,100,114,128,142,156,170,184,198),]
colnames(finaltable_PHQ)<- c("N", "model","term", "beta", "SE", "t",
"p", "rsquared" )
finaltable_PHQ$beta <- round(finaltable_PHQ$beta, digits = 2)
finaltable_PHQ$rsquared <- as.numeric(finaltable_PHQ$rsquared)
finaltable_PHQ$rsquared <- round(finaltable_PHQ$rsquared, digits = 2)
finaltable_PHQ$p <- round(finaltable_PHQ$p, digits = 3)
finaltable_PHQ <- finaltable_PHQ[,c(3,1,4,8,7)]
### GAD with just covariates####
GAD_PHQt2 <- export_summs(GAD_PHQ1, scale = TRUE)
GAD_CUDITt2 <- export_summs(GAD_CUDIT1,scale = TRUE)
GAD_AUDITt2 <-export_summs(GAD_AUDIT1,scale = TRUE)
GAD_unilt2 <- export_summs(GAD_unil1,scale = TRUE)
GAD_prelt2 <- export_summs(GAD_prel1,scale = TRUE)
GAD_SAt2 <- export_summs(GAD_SA1,scale = TRUE)
GAD_SCIt2 <- export_summs(GAD_SCI1,scale = TRUE)
GAD_PSt2 <- export_summs(GAD_PS1,scale = TRUE)
GAD_SCt2 <- export_summs(GAD_SC1,scale = TRUE)
GAD_wellbeingt2 <-export_summs(GAD_wellbeing1,scale = TRUE)
GAD_perfectionismt2 <-export_summs(GAD_perfectionism1,scale = TRUE)
GAD_acat2 <- export_summs(GAD_aca1,scale = TRUE)
GAD_acct2 <- export_summs(GAD_acc1,scale = TRUE)
GAD_frt2 <- export_summs(GAD_fr1,scale = TRUE)
GAD_cot2 <- export_summs(GAD_co1,scale = TRUE)
GAD_PHQr2 <- GAD_PHQt2[31,2]
GAD_CUDITr2 <- GAD_CUDITt2[31,2]
GAD_AUDITr2 <-GAD_AUDITt2[31,2]
GAD_unilr2 <- GAD_unilt2[31,2]
GAD_prelr2 <- GAD_prelt2[31,2]
GAD_SAr2 <- GAD_SAt2[31,2]
GAD_SCIr2 <- GAD_SCIt2[31,2]
GAD_PSr2 <- GAD_PSt2[31,2]
GAD_SCr2 <- GAD_SCt2[31,2]
GAD_wellbeingz2 <-GAD_wellbeingt2[31,2]
GAD_perfectionismz2 <-GAD_perfectionismt2[31,2]
GAD_acaz2 <- GAD_acat2[31,2]
GAD_accz2 <- GAD_acct2[31,2]
GAD_frz2 <- GAD_frt2[31,2]
GAD_coz2 <- GAD_cot2[31,2]
GAD_PHQr2$model <- "PHQ"
GAD_CUDITr2$model <- "CUDIT"
GAD_AUDITr2$model <- "AUDIT"
GAD_unilr2$model <- "Unil"
GAD_prelr2$model <- "Prel"
GAD_SAr2$model <- "SA"
GAD_SCIr2$model <- "SCI"
GAD_PSr2$model <- "PS"
GAD_SCr2$model <- "SC"
GAD_wellbeingz2$model <- "wellbeing"
GAD_perfectionismz2$model <-"perfectionism"
GAD_acaz2$model <- "academic"
GAD_accz2$model <- "accomodation"
GAD_frz2$model <- "friendship"
GAD_coz2$model <- "community"
rsquared_simp2 <- rbind(GAD_PHQr2,
GAD_CUDITr2,GAD_AUDITr2,GAD_unilr2,
GAD_prelr2,GAD_SAr2,GAD_SCIr2,
GAD_PSr2,GAD_SCr2,GAD_wellbeingz2,GAD_perfectionismz2,
GAD_acaz2,GAD_accz2,GAD_frz2,GAD_coz2)
GAD_PHQn2 <- GAD_PHQt2[30,2]
GAD_CUDITn2 <- GAD_CUDITt2[30,2]
GAD_AUDITn2 <-GAD_AUDITt2[30,2]
GAD_uniln2 <- GAD_unilt2[30,2]
GAD_preln2 <- GAD_prelt2[30,2]
GAD_SAn2 <- GAD_SAt2[30,2]
GAD_SCIn2 <- GAD_SCIt2[30,2]
GAD_PSn2 <- GAD_PSt2[30,2]
GAD_SCn2 <- GAD_SCt2[30,2]
GAD_wellbeingn2 <-GAD_wellbeingt2[30,2]
GAD_perfectionismn2 <-GAD_perfectionismt2[30,2]
GAD_acan2 <- GAD_acat2[30,2]
GAD_accn2 <- GAD_acct2[30,2]
GAD_frn2 <- GAD_frt2[30,2]
GAD_con2 <- GAD_cot2[30,2]
GAD_PHQn2$model <- "PHQ"
GAD_CUDITn2$model <- "CUDIT"
GAD_AUDITn2$model <- "AUDIT"
GAD_uniln2$model <- "Unil"
GAD_preln2$model <- "Prel"
GAD_SAn2$model <- "SA"
GAD_SCIn2$model <- "SCI"
GAD_PSn2$model <- "PS"
GAD_SCn2$model <- "SC"
GAD_wellbeingn2$model <- "wellbeing"
GAD_perfectionismn2$model <-"perfectionism"
GAD_acan2$model <- "academic"
GAD_accn2$model <- "accomodation"
GAD_frn2$model <- "friendship"
GAD_con2$model <- "community"
n_simp2 <- rbind(GAD_PHQn2,
GAD_CUDITn2,GAD_AUDITn2,GAD_uniln2,
GAD_preln2,GAD_SAn2,GAD_SCIn2,
GAD_PSn2,GAD_SCn2,GAD_wellbeingn2,GAD_perfectionismn2,
GAD_acan2,GAD_accn2,GAD_frn2,GAD_con2)
colnames(rsquared_simp2)<- c("rsquared", "model")
colnames(n_simp2)<- c("n", "model")
all_models_simp2 <- rbind(
tidy(GAD_PHQ1) %>% mutate(model = "PHQ"),
tidy(GAD_CUDIT1) %>% mutate(model = "CUDIT"),
tidy(GAD_AUDIT1) %>% mutate(model = "AUDIT"),
tidy(GAD_unil1) %>% mutate(model = "Unil"),
tidy(GAD_prel1) %>% mutate(model = "Prel"),
tidy(GAD_SA1) %>% mutate(model = "SA"),
tidy(GAD_SCI1) %>% mutate(model = "SCI"),
tidy(GAD_PS1) %>% mutate(model = "PS"),
tidy(GAD_wellbeing1) %>% mutate(model = "wellbeing"),
tidy(GAD_SC1) %>% mutate(model = "SC"),
tidy(GAD_perfectionism1) %>% mutate(model = "perfectionism"),
tidy(GAD_aca1) %>% mutate(model = "academic"),
tidy(GAD_co1) %>% mutate(model = "community"),
tidy(GAD_fr1) %>% mutate(model = "friendship"),
tidy(GAD_acc1) %>% mutate(model = "accomodation")
)
finaltable_GAD <- right_join( all_models_simp2, rsquared_simp2)
## Joining with `by = join_by(model)`
finaltable_GAD <- right_join(n_simp2, finaltable_GAD)
## Joining with `by = join_by(model)`
## Warning in right_join(n_simp2, finaltable_GAD): Each row in `x` is expected to match at most 1 row in `y`.
## ℹ Row 1 of `x` matches multiple rows.
## ℹ If multiple matches are expected, set `multiple = "all"` to silence this
## warning.
finaltable_GAD <- as.data.frame(finaltable_GAD)
finaltable_GAD<- finaltable_GAD[c(2,16,30,44,58,72,86,100,114,128,142,156,170,184,198),]
colnames(finaltable_GAD)<- c("N1","Model", "term", "beta1", "SE1", "t1", "p1",
"rsquared1" )
finaltable_GAD$beta1 <- round(finaltable_GAD$beta1, digits = 2)
finaltable_GAD$rsquared1 <- as.numeric(finaltable_GAD$rsquared1)
finaltable_GAD$rsquared1 <- round(finaltable_GAD$rsquared1, digits = 2)
finaltable_GAD$p1 <- round(finaltable_GAD$p1, digits = 3)
finaltable_GAD <- finaltable_GAD[,c(3,1,4,8,7)]
# final table (mulitple no finance)####
PHQ <- as.data.frame(rbind(c("term","N", "beta", "rsquared", "p"),
c("PHQz", "-","-", "-", "-"))
)
names(PHQ) <- PHQ[1,]
PHQ <- PHQ[- c(1),]
GAD <- as.data.frame(rbind(c("term","N1", "beta1", "rsquared1", "p1"),
c("GADz", "-", "-","-", "-"))
)
names(GAD) <- GAD[1,]
GAD <- GAD[- c(1),]
finaltable_GAD <- rbind( GAD, finaltable_GAD)
finaltable_PHQ <- rbind(PHQ, finaltable_PHQ)
final_table <- right_join(finaltable_GAD,finaltable_PHQ)
## Joining with `by = join_by(term)`
knitr::kable(final_table, "pipe", caption = "Multiple Linear Regression with demographics as covariates")
| term | N1 | beta1 | rsquared1 | p1 | N | beta | rsquared | p |
|---|---|---|---|---|---|---|---|---|
| GADz | - | - | - | - | 217 | 0.73 | 0.63 | 0 |
| PHQz | 217 | 0.74 | 0.64 | 0 | - | - | - | - |
| CUDITz | 101 | 0.09 | 0.28 | 0.402 | 101 | 0.04 | 0.3 | 0.663 |
| AUDITz | 217 | 0.11 | 0.21 | 0.093 | 217 | 0.08 | 0.2 | 0.214 |
| unil_z | 217 | 0.4 | 0.34 | 0 | 217 | 0.49 | 0.4 | 0 |
| prel_z | 217 | 0.33 | 0.28 | 0 | 217 | 0.33 | 0.28 | 0 |
| SAz | 217 | 0.5 | 0.42 | 0 | 217 | 0.48 | 0.4 | 0 |
| SCInz | 212 | 0.55 | 0.45 | 0 | 212 | 0.63 | 0.51 | 0 |
| PSz | 214 | 0.66 | 0.54 | 0 | 214 | 0.69 | 0.57 | 0 |
| SCz | 217 | -0.07 | 0.21 | 0.294 | 217 | -0.23 | 0.25 | 0 |
| wellbeingz | 214 | -0.64 | 0.53 | 0 | 214 | -0.72 | 0.62 | 0 |
| perfectionismz | 212 | 0.36 | 0.33 | 0 | 212 | 0.35 | 0.31 | 0 |
| SE_aca_z | 217 | -0.42 | 0.33 | 0 | 217 | -0.46 | 0.35 | 0 |
| SE_acc_z | 217 | -0.42 | 0.33 | 0 | 217 | -0.46 | 0.35 | 0 |
| SE_fr_z | 217 | -0.25 | 0.26 | 0 | 217 | -0.36 | 0.32 | 0 |
| SE_co_z | 209 | -0.22 | 0.25 | 0.001 | 209 | -0.15 | 0.23 | 0.027 |
# table PHQ####
PHQ_GADt <- export_summs(PHQ_GAD2, scale = TRUE)
PHQ_CUDITt <- export_summs(PHQ_CUDIT2,scale = TRUE)
PHQ_AUDITt <-export_summs(PHQ_AUDIT2,scale = TRUE)
PHQ_unilt <- export_summs(PHQ_unil2,scale = TRUE)
PHQ_prelt <- export_summs(PHQ_prel2,scale = TRUE)
PHQ_SAt <- export_summs(PHQ_SA2,scale = TRUE)
PHQ_SCIt <- export_summs(PHQ_SCI2,scale = TRUE)
PHQ_PSt <- export_summs(PHQ_PS2,scale = TRUE)
PHQ_SCt <- export_summs(PHQ_SC2,scale = TRUE)
PHQ_wellbeingt <-export_summs(PHQ_wellbeing2,scale = TRUE)
PHQ_perfectionismt <-export_summs(PHQ_perfectionism2,scale = TRUE)
PHQ_acat <- export_summs(PHQ_aca2,scale = TRUE)
PHQ_acct <- export_summs(PHQ_acc2,scale = TRUE)
PHQ_frt <- export_summs(PHQ_fr2,scale = TRUE)
PHQ_cot <- export_summs(PHQ_co2,scale = TRUE)
PHQ_GADn <- PHQ_GADt[32,2]
PHQ_CUDITn <- PHQ_CUDITt[32,2]
PHQ_AUDITn <-PHQ_AUDITt[32,2]
PHQ_uniln <- PHQ_unilt[32,2]
PHQ_preln <- PHQ_prelt[32,2]
PHQ_SAn <- PHQ_SAt[32,2]
PHQ_SCIn <- PHQ_SCIt[32,2]
PHQ_PSn <- PHQ_PSt[32,2]
PHQ_SCn <- PHQ_SCt[32,2]
PHQ_wellbeingn <-PHQ_wellbeingt[32,2]
PHQ_perfectionismn <-PHQ_perfectionismt[32,2]
PHQ_acan <- PHQ_acat[32,2]
PHQ_accn <- PHQ_acct[32,2]
PHQ_frn <- PHQ_frt[32,2]
PHQ_con <- PHQ_cot[32,2]
PHQ_GADn$model <- "GAD"
PHQ_CUDITn$model <- "CUDIT"
PHQ_AUDITn$model <- "AUDIT"
PHQ_uniln$model <- "Unil"
PHQ_preln$model <- "Prel"
PHQ_SAn$model <- "SA"
PHQ_SCIn$model <- "SCI"
PHQ_PSn$model <- "PS"
PHQ_SCn$model <- "SC"
PHQ_wellbeingn$model <- "wellbeing"
PHQ_perfectionismn$model <-"perfectionism"
PHQ_acan$model <- "academic"
PHQ_accn$model <- "accomodation"
PHQ_frn$model <- "friendship"
PHQ_con$model <- "community"
PHQ_GADr <- PHQ_GADt[33,2]
PHQ_CUDITr <- PHQ_CUDITt[33,2]
PHQ_AUDITr <-PHQ_AUDITt[33,2]
PHQ_unilr <- PHQ_unilt[33,2]
PHQ_prelr <- PHQ_prelt[33,2]
PHQ_SAr <- PHQ_SAt[33,2]
PHQ_SCIr <- PHQ_SCIt[33,2]
PHQ_PSr <- PHQ_PSt[33,2]
PHQ_SCr <- PHQ_SCt[33,2]
PHQ_wellbeingz <-PHQ_wellbeingt[33,2]
PHQ_perfectionismz <-PHQ_perfectionismt[33,2]
PHQ_acaz <- PHQ_acat[33,2]
PHQ_accz <- PHQ_acct[33,2]
PHQ_frz <- PHQ_frt[33,2]
PHQ_coz <- PHQ_cot[33,2]
PHQ_GADr$model <- "GAD"
PHQ_CUDITr$model <- "CUDIT"
PHQ_AUDITr$model <- "AUDIT"
PHQ_unilr$model <- "Unil"
PHQ_prelr$model <- "Prel"
PHQ_SAr$model <- "SA"
PHQ_SCIr$model <- "SCI"
PHQ_PSr$model <- "PS"
PHQ_SCr$model <- "SC"
PHQ_wellbeingz$model <- "wellbeing"
PHQ_perfectionismz$model <-"perfectionism"
PHQ_acaz$model <- "academic"
PHQ_accz$model <- "accomodation"
PHQ_frz$model <- "friendship"
PHQ_coz$model <- "community"
n <- rbind(PHQ_GADn,
PHQ_CUDITn,PHQ_AUDITn,PHQ_uniln,
PHQ_preln,PHQ_SAn,PHQ_SCIn,
PHQ_PSn,PHQ_SCn,PHQ_wellbeingn,PHQ_perfectionismn,
PHQ_acan,PHQ_accn,PHQ_frn,PHQ_con)
rsquared <- rbind(PHQ_GADr,
PHQ_CUDITr,PHQ_AUDITr,PHQ_unilr,
PHQ_prelr,PHQ_SAr,PHQ_SCIr,
PHQ_PSr,PHQ_SCr,PHQ_wellbeingz,PHQ_perfectionismz,
PHQ_acaz,PHQ_accz,PHQ_frz,PHQ_coz)
colnames(rsquared)<- c("rsquared", "model")
colnames(n)<- c("n", "model")
all_models <- rbind(
tidy(PHQ_GAD2) %>% mutate(model = "GAD"),
tidy(PHQ_CUDIT2) %>% mutate(model = "CUDIT"),
tidy(PHQ_AUDIT2) %>% mutate(model = "AUDIT"),
tidy(PHQ_unil2) %>% mutate(model = "Unil"),
tidy(PHQ_prel2) %>% mutate(model = "Prel"),
tidy(PHQ_SA2) %>% mutate(model = "SA"),
tidy(PHQ_SCI2) %>% mutate(model = "SCI"),
tidy(PHQ_PS2) %>% mutate(model = "PS"),
tidy(PHQ_SC2) %>% mutate(model = "SC"),
tidy(PHQ_wellbeing2) %>% mutate(model = "wellbeing"),
tidy(PHQ_perfectionism2) %>% mutate(model = "perfectionism"),
tidy(PHQ_aca2) %>% mutate(model = "academic"),
tidy(PHQ_co2) %>% mutate(model = "community"),
tidy(PHQ_fr2) %>% mutate(model = "friendship"),
tidy(PHQ_acc2) %>% mutate(model = "accomodation")
)
finaltable2_PHQ <- right_join( all_models, rsquared)
## Joining with `by = join_by(model)`
finaltable2_PHQ <- right_join(n, finaltable2_PHQ)
## Joining with `by = join_by(model)`
## Warning in right_join(n, finaltable2_PHQ): Each row in `x` is expected to match at most 1 row in `y`.
## ℹ Row 1 of `x` matches multiple rows.
## ℹ If multiple matches are expected, set `multiple = "all"` to silence this
## warning.
finaltable2_PHQ <- as.data.frame(finaltable2_PHQ)
finaltable2_PHQ <- finaltable2_PHQ[c(2,17,32,47,62,77,92,107,122,137,152,167,182,197,212),]
colnames(finaltable2_PHQ)<- c("N", "model", "term", "beta", "SE", "t", "p", "rsquared" )
finaltable2_PHQ$beta <- round(finaltable2_PHQ$beta, digits = 2)
finaltable2_PHQ$rsquared <- as.numeric(finaltable2_PHQ$rsquared)
finaltable2_PHQ$rsquared <- round(finaltable2_PHQ$rsquared, digits = 2)
finaltable2_PHQ$p <- round(finaltable2_PHQ$p, digits = 3)
finaltable2_PHQ <- finaltable2_PHQ[,c(3,1,4,8,7)]
# GAD tables####
GAD_PHQt <- export_summs(GAD_PHQ2, scale = TRUE)
GAD_CUDITt <- export_summs(GAD_CUDIT2,scale = TRUE)
GAD_AUDITt <-export_summs(GAD_AUDIT2,scale = TRUE)
GAD_unilt <- export_summs(GAD_unil2,scale = TRUE)
GAD_prelt <- export_summs(GAD_prel2,scale = TRUE)
GAD_SAt <- export_summs(GAD_SA2,scale = TRUE)
GAD_SCIt <- export_summs(GAD_SCI2,scale = TRUE)
GAD_PSt <- export_summs(GAD_PS2,scale = TRUE)
GAD_SCt <- export_summs(GAD_SC2,scale = TRUE)
GAD_wellbeingt <-export_summs(GAD_wellbeing2,scale = TRUE)
GAD_perfectionismt <-export_summs(GAD_perfectionism2,scale = TRUE)
GAD_acat <- export_summs(GAD_aca2,scale = TRUE)
GAD_acct <- export_summs(GAD_acc2,scale = TRUE)
GAD_frt <- export_summs(GAD_fr2,scale = TRUE)
GAD_cot <- export_summs(GAD_co2,scale = TRUE)
GAD_PHQr <- GAD_PHQt[33,2]
GAD_CUDITr <- GAD_CUDITt[33,2]
GAD_AUDITr <-GAD_AUDITt[33,2]
GAD_unilr <- GAD_unilt[33,2]
GAD_prelr <- GAD_prelt[33,2]
GAD_SAr <- GAD_SAt[33,2]
GAD_SCIr <- GAD_SCIt[33,2]
GAD_PSr <- GAD_PSt[33,2]
GAD_SCr <- GAD_SCt[33,2]
GAD_wellbeingz <-GAD_wellbeingt[33,2]
GAD_perfectionismz <-GAD_perfectionismt[33,2]
GAD_acaz <- GAD_acat[33,2]
GAD_accz <- GAD_acct[33,2]
GAD_frz <- GAD_frt[33,2]
GAD_coz <- GAD_cot[33,2]
GAD_PHQr$model <- "PHQ"
GAD_CUDITr$model <- "CUDIT"
GAD_AUDITr$model <- "AUDIT"
GAD_unilr$model <- "Unil"
GAD_prelr$model <- "Prel"
GAD_SAr$model <- "SA"
GAD_SCIr$model <- "SCI"
GAD_PSr$model <- "PS"
GAD_SCr$model <- "SC"
GAD_wellbeingz$model <- "wellbeing"
GAD_perfectionismz$model <-"perfectionism"
GAD_acaz$model <- "academic"
GAD_accz$model <- "accomodation"
GAD_frz$model <- "friendship"
GAD_coz$model <- "community"
rsquared2 <- rbind(GAD_PHQr,
GAD_CUDITr,GAD_AUDITr,GAD_unilr,
GAD_prelr,GAD_SAr,GAD_SCIr,
GAD_PSr,GAD_SCr,GAD_wellbeingz,GAD_perfectionismz,
GAD_acaz,GAD_accz,GAD_frz,GAD_coz)
GAD_PHQn <- GAD_PHQt[32,2]
GAD_CUDITn <- GAD_CUDITt[32,2]
GAD_AUDITn <-GAD_AUDITt[32,2]
GAD_uniln <- GAD_unilt[32,2]
GAD_preln <- GAD_prelt[32,2]
GAD_SAn <- GAD_SAt[32,2]
GAD_SCIn <- GAD_SCIt[32,2]
GAD_PSn <- GAD_PSt[32,2]
GAD_SCn <- GAD_SCt[32,2]
GAD_wellbeingn <-GAD_wellbeingt[32,2]
GAD_perfectionismn <-GAD_perfectionismt[32,2]
GAD_acan <- GAD_acat[32,2]
GAD_accn <- GAD_acct[32,2]
GAD_frn <- GAD_frt[32,2]
GAD_con <- GAD_cot[32,2]
GAD_PHQn$model <- "PHQ"
GAD_CUDITn$model <- "CUDIT"
GAD_AUDITn$model <- "AUDIT"
GAD_uniln$model <- "Unil"
GAD_preln$model <- "Prel"
GAD_SAn$model <- "SA"
GAD_SCIn$model <- "SCI"
GAD_PSn$model <- "PS"
GAD_SCn$model <- "SC"
GAD_wellbeingn$model <- "wellbeing"
GAD_perfectionismn$model <-"perfectionism"
GAD_acan$model <- "academic"
GAD_accn$model <- "accomodation"
GAD_frn$model <- "friendship"
GAD_con$model <- "community"
n2 <- rbind(GAD_PHQn,
GAD_CUDITn,GAD_AUDITn,GAD_uniln,
GAD_preln,GAD_SAn,GAD_SCIn,
GAD_PSn,GAD_SCn,GAD_wellbeingn,GAD_perfectionismn,
GAD_acan,GAD_accn,GAD_frn,GAD_con)
colnames(rsquared2)<- c("rsquared", "model")
colnames(n2)<- c("n", "model")
all_models2 <- rbind(
tidy(GAD_PHQ2) %>% mutate(model = "PHQ"),
tidy(GAD_CUDIT2) %>% mutate(model = "CUDIT"),
tidy(GAD_AUDIT2) %>% mutate(model = "AUDIT"),
tidy(GAD_unil2) %>% mutate(model = "Unil"),
tidy(GAD_prel2) %>% mutate(model = "Prel"),
tidy(GAD_SA2) %>% mutate(model = "SA"),
tidy(GAD_SCI2) %>% mutate(model = "SCI"),
tidy(GAD_PS2) %>% mutate(model = "PS"),
tidy(GAD_SC2) %>% mutate(model = "SC"),
tidy(GAD_wellbeing2) %>% mutate(model = "wellbeing"),
tidy(GAD_perfectionism2) %>% mutate(model = "perfectionism"),
tidy(GAD_aca2) %>% mutate(model = "academic"),
tidy(GAD_co2) %>% mutate(model = "community"),
tidy(GAD_fr2) %>% mutate(model = "friendship"),
tidy(GAD_acc2) %>% mutate(model = "accomodation")
)
finaltable2_GAD <- right_join( all_models2, rsquared2)
## Joining with `by = join_by(model)`
finaltable2_GAD <- right_join( n2, finaltable2_GAD)
## Joining with `by = join_by(model)`
## Warning in right_join(n2, finaltable2_GAD): Each row in `x` is expected to match at most 1 row in `y`.
## ℹ Row 1 of `x` matches multiple rows.
## ℹ If multiple matches are expected, set `multiple = "all"` to silence this
## warning.
finaltable2_GAD <- as.data.frame(finaltable2_GAD)
finaltable2_GAD <- finaltable2_GAD[c(2,17,32,47,62,77,92,107,122,137,152,167,182,197,212),]
colnames(finaltable2_GAD)<- c("N1", "model", "term", "beta1", "SE", "t", "p1", "rsquared1" )
finaltable2_GAD$beta1 <- round(finaltable2_GAD$beta1, digits = 2)
finaltable2_GAD$rsquared1 <- as.numeric(finaltable2_GAD$rsquared1)
finaltable2_GAD$rsquared1 <- round(finaltable2_GAD$rsquared1, digits = 2)
finaltable2_GAD$p1 <- round(finaltable2_GAD$p1, digits = 3)
finaltable2_GAD <- finaltable2_GAD[,c(3,1,4,8,7)]
# final table 2 (mulitple finance)####
finaltable2_GAD <- rbind( GAD, finaltable2_GAD)
finaltable2_PHQ <- rbind(PHQ, finaltable2_PHQ)
final_table2 <- right_join(finaltable2_GAD,finaltable2_PHQ)
## Joining with `by = join_by(term)`
knitr::kable(final_table2, "pipe", caption = "Multiple Linear regression with demographics & finance as covariates")
| term | N1 | beta1 | rsquared1 | p1 | N | beta | rsquared | p |
|---|---|---|---|---|---|---|---|---|
| GADz | - | - | - | - | 217 | 0.69 | 0.65 | 0 |
| PHQz | 217 | 0.73 | 0.64 | 0 | - | - | - | - |
| CUDITz | 101 | 0.15 | 0.45 | 0.108 | 101 | 0.09 | 0.42 | 0.299 |
| AUDITz | 217 | 0.1 | 0.27 | 0.127 | 217 | 0.06 | 0.3 | 0.295 |
| unil_z | 217 | 0.37 | 0.38 | 0 | 217 | 0.45 | 0.47 | 0 |
| prel_z | 217 | 0.34 | 0.35 | 0 | 217 | 0.34 | 0.38 | 0 |
| SAz | 217 | 0.47 | 0.45 | 0 | 217 | 0.44 | 0.46 | 0 |
| SCInz | 212 | 0.51 | 0.46 | 0 | 212 | 0.57 | 0.54 | 0 |
| PSz | 214 | 0.63 | 0.55 | 0 | 214 | 0.65 | 0.59 | 0 |
| SCz | 217 | -0.02 | 0.27 | 0.791 | 217 | -0.17 | 0.32 | 0.005 |
| wellbeingz | 214 | -0.61 | 0.54 | 0 | 214 | -0.68 | 0.64 | 0 |
| perfectionismz | 212 | 0.33 | 0.36 | 0 | 212 | 0.3 | 0.38 | 0 |
| SE_aca_z | 217 | -0.37 | 0.36 | 0 | 217 | -0.39 | 0.4 | 0 |
| SE_acc_z | 217 | -0.37 | 0.36 | 0 | 217 | -0.39 | 0.4 | 0 |
| SE_fr_z | 217 | -0.24 | 0.32 | 0 | 217 | -0.35 | 0.41 | 0 |
| SE_co_z | 209 | -0.21 | 0.3 | 0.002 | 209 | -0.13 | 0.32 | 0.04 |
wave1$Q207 <- dplyr::recode(wave1$Q207, "1" = "Yes", "2" = "No")
wave1$DNA <- "Not Answered"
wave1$DNA[wave1$Q207 == "Yes"] <- "Yes"
wave1$DNA[wave1$Q207 == "No"] <- "No"
table(wave1$DNA)
##
## No Not Answered Yes
## 50 260 134
# No Not Answered Yes
# 50 260 134
prop.table(table(wave1$DNA))
##
## No Not Answered Yes
## 0.1126126 0.5855856 0.3018018
pass$Q207 <- dplyr::recode(pass$Q207, "1" = "Yes", "2" = "No")
pass$DNA <- "Not Answered"
pass$DNA[pass$Q207 == "Yes"] <- "Yes"
pass$DNA[pass$Q207 == "No"] <- "No"
table(pass$DNA)
##
## No Not Answered Yes
## 49 60 133
# No Not Answered Yes
# 49 60 133
prop.table(table(pass$DNA))
##
## No Not Answered Yes
## 0.2024793 0.2479339 0.5495868
# No Not Answered Yes
# 0.20 0.25 0.55
wave1$Q209 <- dplyr::recode(wave1$Q209, "1" = "Yes", "2" = "No")
wave1$medicine <- "Not Answered"
wave1$medicine[wave1$Q209 == "Yes"] <- "Yes"
wave1$medicine[wave1$Q209 == "No"] <- "No"
table(wave1$medicine)
##
## No Not Answered Yes
## 73 260 111
# No Not Answered Yes
#. 73 260 111
prop.table(table(wave1$medicine))
##
## No Not Answered Yes
## 0.1644144 0.5855856 0.2500000
# No Not Answered Yes
# 0.16 0.59 0.25
pass$Q209 <- dplyr::recode(pass$Q209, "1" = "Yes", "2" = "No")
pass$medicine <- "Not Answered"
pass$medicine[pass$Q209 == "Yes"] <- "Yes"
pass$medicine[pass$Q209 == "No"] <- "No"
table(pass$medicine)
##
## No Not Answered Yes
## 71 60 111
# No Not Answered Yes
# 71 60 111
prop.table(table(pass$medicine))
##
## No Not Answered Yes
## 0.2933884 0.2479339 0.4586777
# No Not Answered Yes
# 0.30 0.25 0.45